Is it possible for an app using NSPersistentCloudKitContainer
to enable sync in the background, if so, how?
- Install app on your iPhone and iPad, create some data, it automatically syncs to both and life is good
- Close the iPad app
- Modify the data on iPhone
Desired behavior: The backgrounded iPad app should sync (even if it takes a while) and be informed that its local database has finished syncing or similarly that changes were made.
The use case is I want to reload my widget when data changes so it's up-to-date, so I need my app to sync it in the background, then notify when it's complete to be able to trigger the widget reload.
I am concerned it will be a poor widget experience if it's always showing stale data until they manually open the app to initiate sync - kind of defeats the purpose of widgets. ha
According to this post, they found sync is never run in the background. Is this not the case, or has it changed in iOS 15?
Thanks!