Post

Replies

Boosts

Views

Activity

SwiftData Issue: Unable to Retrieve Data with @Query After Background Wake-up
Recently, I have been using SwiftData as a data persistence tool in my new SwiftUI app. My app utilizes CLLocationManager for background location tracking to wake up the app and update SwiftData-related data. When the app is in the foreground or background, SwiftData's @Query can normally retrieve data. However, once the user manually terminates the app and it receives a location-based wake-up, SwiftData's @Query no longer retrieves data. I have looked through many resources and haven't found any similar documentation. I wonder if anyone can give me some suggestions?
0
0
171
4w