@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!
Post
Replies
Boosts
Views
Activity
@Engineer Hi, just checked the crash report under Xcode -> Window -> Organiser -> Crashes and the crash still happens in Widget Extension with the same error.
Am I missing something?
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
Experiencing the same issue on iOS 17.4.1 yet.
Hello!
In onAppear method of a view where you use searchable - you can try UISearchBar.appearance().tintColor = .green
The interesting thing is that in an example that was mentioned during the session, author implemented the desired behaviour using new iOS 17 API, maybe I'm missing how HeroView was implemented?
Hi, any updates?