Post

Replies

Boosts

Views

Activity

Widget is crashing with 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=30 MB, unused=0x0)
I have created widget which supports medium and large family similar to news feed app like title and image by configuring the medium widget with 2 articles and large with 4 articles where each article has title and it's image with size 46x46 and 61x61. When am adding the small and large widgets to my Home Screen getting memory limit (Thread 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=30 MB, unused=0x0)(crash and the widget is not refreshing and some times widgets is showing the skeletons instead of data. This is my timeline provider     func getTimeline(in context: Context, completion: @escaping (Timeline) -> Void) {             widgetVM.getRecommendedDataForWidget{ (result) in                 switch result {                 case .success(let items):                     let entries =  getRecommendedWidgetTimeLineEntries(recFeedModel: items)                     let timeline = Timeline(entries: entries, policy: .atEnd)                     completion(timeline)                 case .failure(_):                         let entry = RecommendedWidgetEntry(date: Date(), recommedationData: WidgetFeedModel.getPlaceholderData())                         let timeline = Timeline(entries: [entry], policy: .never)                         completion(timeline)                 }             }         }         else {             if accessTokenValue == nil { // if token is nil then considering it as member is not logged in.                 let entry = RecommendedWidgetEntry(date: Date(), recommedationData: [])                 let timeline = Timeline(entries: [entry], policy: .never)                 completion(timeline)                 return             }     } Could you please help me out on this as this is priority for me as part of app release. I couldn't find out the reason for this. Thanks
9
0
4.1k
Sep ’22
Widget is not auto refreshing
Widget needs to be auto refreshed at 6AM & 6PM every day. I have added the following logic/code based on the widget adding time. But I could not see the widget is auto refreshing at 6AM & 6PM let calendar = Calendar.current           let TimeComponentfor6AM = DateComponents(calendar: calendar, hour:6)           let TimeComponentfor6PM   = DateComponents(calendar: calendar, hour: 18, minute: 00)           let now = Date()           let startOfToday = calendar.startOfDay(for: now)           let startTime    = calendar.date(byAdding: TimeComponentfor6AM, to: startOfToday)!           let endTime      = calendar.date(byAdding: TimeComponentfor6PM, to: startOfToday)!         if now < startTime {//if widget adds before 6AM             if let At6AM = Calendar.current.date(bySettingHour: 6, minute: 0, second: 0, of: Date()) {                 let refreshEntryFor6AM = RecommendedWidgetEntry(date: At6AM, recommedationData: recFeedModel)                 refreshEntries.append(refreshEntryFor6AM)             }             if let At6PM = Calendar.current.date(bySettingHour: 18, minute: 0, second: 0, of: Date()) {                 let refreshEntryFor6PM = RecommendedWidgetEntry(date: At6PM, recommedationData: recFeedModel)                 refreshEntries.append(refreshEntryFor6PM)             }             return refreshEntries         }         else if now < endTime { //if the widget adds before 6PM             if let At6PM = Calendar.current.date(bySettingHour: 18, minute: 0, second: 0, of: Date()) {                 let refreshEntryFor6PM = RecommendedWidgetEntry(date: At6PM, recommedationData: recFeedModel)                 refreshEntries.append(refreshEntryFor6PM)             }             let today = Date()             if let nextDayDate = Calendar.current.date(byAdding: .day, value: 1, to: today)             {                 if let At6AM = Calendar.current.date(bySettingHour: 6, minute: 0, second: 0, of: nextDayDate) {                     let refreshEntryFor6AM = RecommendedWidgetEntry(date: At6AM, recommedationData: recFeedModel)                     refreshEntries.append(refreshEntryFor6AM)                 }             }             return refreshEntries         }         else { // if widget added post 6PM             let today = Date()             if let nextDayDate = Calendar.current.date(byAdding: .day, value: 1, to: today)             {                 if let At6AM = Calendar.current.date(bySettingHour: 6, minute: 0, second: 0, of: nextDayDate) {                     let refreshEntryFor6AM = RecommendedWidgetEntry(date: At6AM, recommedationData: recFeedModel)                     refreshEntries.append(refreshEntryFor6AM)                 }                 if let At6PM = Calendar.current.date(bySettingHour: 18, minute: 0, second: 0, of: nextDayDate) {                     let refreshEntryFor6PM = RecommendedWidgetEntry(date: At6PM, recommedationData: recFeedModel)                     refreshEntries.append(refreshEntryFor6PM)                 }             } Kindly help me on it if anything missed or need to be added
3
0
643
Sep ’22
Installed Xcode 15.3. My iPhone (iOS 17.4) is not detecting in Xcode
I have updated my Xcode version to 15.3 and my real iPhone device is on iOS 17.4. When I connect my iPhone to Mac, Xcode is not detecting my device. Which is a blocker for me to run my app on my device to test some important things which is not able to do it on simulator.
Replies
0
Boosts
0
Views
447
Activity
Mar ’24
What is the risk/impact for app, if third party sdks don’t update their privacy manifests?
For example my app is using Firebase and Alamofire. Still I could find the Manifest files for the above SDKs. What would be impact on app if the above api's is not updated with their Manifests.
Replies
2
Boosts
0
Views
678
Activity
Feb ’24
Widget is crashing with 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=30 MB, unused=0x0)
I have created widget which supports medium and large family similar to news feed app like title and image by configuring the medium widget with 2 articles and large with 4 articles where each article has title and it's image with size 46x46 and 61x61. When am adding the small and large widgets to my Home Screen getting memory limit (Thread 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=30 MB, unused=0x0)(crash and the widget is not refreshing and some times widgets is showing the skeletons instead of data. This is my timeline provider     func getTimeline(in context: Context, completion: @escaping (Timeline) -> Void) {             widgetVM.getRecommendedDataForWidget{ (result) in                 switch result {                 case .success(let items):                     let entries =  getRecommendedWidgetTimeLineEntries(recFeedModel: items)                     let timeline = Timeline(entries: entries, policy: .atEnd)                     completion(timeline)                 case .failure(_):                         let entry = RecommendedWidgetEntry(date: Date(), recommedationData: WidgetFeedModel.getPlaceholderData())                         let timeline = Timeline(entries: [entry], policy: .never)                         completion(timeline)                 }             }         }         else {             if accessTokenValue == nil { // if token is nil then considering it as member is not logged in.                 let entry = RecommendedWidgetEntry(date: Date(), recommedationData: [])                 let timeline = Timeline(entries: [entry], policy: .never)                 completion(timeline)                 return             }     } Could you please help me out on this as this is priority for me as part of app release. I couldn't find out the reason for this. Thanks
Replies
9
Boosts
0
Views
4.1k
Activity
Sep ’22
Widget is not auto refreshing
Widget needs to be auto refreshed at 6AM & 6PM every day. I have added the following logic/code based on the widget adding time. But I could not see the widget is auto refreshing at 6AM & 6PM let calendar = Calendar.current           let TimeComponentfor6AM = DateComponents(calendar: calendar, hour:6)           let TimeComponentfor6PM   = DateComponents(calendar: calendar, hour: 18, minute: 00)           let now = Date()           let startOfToday = calendar.startOfDay(for: now)           let startTime    = calendar.date(byAdding: TimeComponentfor6AM, to: startOfToday)!           let endTime      = calendar.date(byAdding: TimeComponentfor6PM, to: startOfToday)!         if now < startTime {//if widget adds before 6AM             if let At6AM = Calendar.current.date(bySettingHour: 6, minute: 0, second: 0, of: Date()) {                 let refreshEntryFor6AM = RecommendedWidgetEntry(date: At6AM, recommedationData: recFeedModel)                 refreshEntries.append(refreshEntryFor6AM)             }             if let At6PM = Calendar.current.date(bySettingHour: 18, minute: 0, second: 0, of: Date()) {                 let refreshEntryFor6PM = RecommendedWidgetEntry(date: At6PM, recommedationData: recFeedModel)                 refreshEntries.append(refreshEntryFor6PM)             }             return refreshEntries         }         else if now < endTime { //if the widget adds before 6PM             if let At6PM = Calendar.current.date(bySettingHour: 18, minute: 0, second: 0, of: Date()) {                 let refreshEntryFor6PM = RecommendedWidgetEntry(date: At6PM, recommedationData: recFeedModel)                 refreshEntries.append(refreshEntryFor6PM)             }             let today = Date()             if let nextDayDate = Calendar.current.date(byAdding: .day, value: 1, to: today)             {                 if let At6AM = Calendar.current.date(bySettingHour: 6, minute: 0, second: 0, of: nextDayDate) {                     let refreshEntryFor6AM = RecommendedWidgetEntry(date: At6AM, recommedationData: recFeedModel)                     refreshEntries.append(refreshEntryFor6AM)                 }             }             return refreshEntries         }         else { // if widget added post 6PM             let today = Date()             if let nextDayDate = Calendar.current.date(byAdding: .day, value: 1, to: today)             {                 if let At6AM = Calendar.current.date(bySettingHour: 6, minute: 0, second: 0, of: nextDayDate) {                     let refreshEntryFor6AM = RecommendedWidgetEntry(date: At6AM, recommedationData: recFeedModel)                     refreshEntries.append(refreshEntryFor6AM)                 }                 if let At6PM = Calendar.current.date(bySettingHour: 18, minute: 0, second: 0, of: nextDayDate) {                     let refreshEntryFor6PM = RecommendedWidgetEntry(date: At6PM, recommedationData: recFeedModel)                     refreshEntries.append(refreshEntryFor6PM)                 }             } Kindly help me on it if anything missed or need to be added
Replies
3
Boosts
0
Views
643
Activity
Sep ’22
Refresh the widget at 6AM and 6PM daily
Need to refresh the widget on daily basis twice at 6AM and 6PM by hitting the api. At each time to fetch the data from server and update the widgets at 6AM and 6PM with latest content. Could you please suggest how can I define my time lines entries.
Replies
1
Boosts
0
Views
422
Activity
Sep ’22