Post

Replies

Boosts

Views

Activity

Reply to Crash in Widget extension
Thanks for the reply! Yes, I have followed this documentation: https://developer.apple.com/documentation/xcode/sigkill And added next code snippet: let activity = ProcessInfo.processInfo.beginActivity(options: .userInitiated, reason: "Fetching Data From CoreData In Widget Extension...") defer { ProcessInfo.processInfo.endActivity(activity) } to the getTimeline() in widget extension like this: Task { let activity = ProcessInfo.processInfo.beginActivity(options: .userInitiated, reason: "💜 Fetching Upcoming Tasks For Widget...") defer { ProcessInfo.processInfo.endActivity(activity) } /// fetching from the CoreData storage let data = await PersistenceController.fetchUpcomingData() let entries = // make entries let refreshAfter = // some time completion(entries, refreshAfter) } Does it look good in getTimeline()? @Engineer Hope it will fix crashes to follow our bug-free policy! Thanks again and I will update the ticket after we release the fix. ~ Pavel
Jun ’24
Reply to Crash in Widget extension
@Engineer Hi, Sorry for many questions - still can't figure out why crash happens in widget extension. I was curious, if it can be connected to the usage of NSPersistentCloudKitContainer? Would appreciate any help of advice. Thanks in advance!
Replies
Boosts
Views
Activity
Jul ’24
Reply to Crash in Widget extension
Thanks for the reply! Yes, I have followed this documentation: https://developer.apple.com/documentation/xcode/sigkill And added next code snippet: let activity = ProcessInfo.processInfo.beginActivity(options: .userInitiated, reason: "Fetching Data From CoreData In Widget Extension...") defer { ProcessInfo.processInfo.endActivity(activity) } to the getTimeline() in widget extension like this: Task { let activity = ProcessInfo.processInfo.beginActivity(options: .userInitiated, reason: "💜 Fetching Upcoming Tasks For Widget...") defer { ProcessInfo.processInfo.endActivity(activity) } /// fetching from the CoreData storage let data = await PersistenceController.fetchUpcomingData() let entries = // make entries let refreshAfter = // some time completion(entries, refreshAfter) } Does it look good in getTimeline()? @Engineer Hope it will fix crashes to follow our bug-free policy! Thanks again and I will update the ticket after we release the fix. ~ Pavel
Replies
Boosts
Views
Activity
Jun ’24