Import ubiquitous changes in the background for apps that support background fetching

Originator:Greiner.Mike
Number:rdar://15175379 Date Originated:2013-10-08
Status:Open Resolved:
Product:iOS SDK Product Version:7.0
Classification:Enhancement Reproducible:N/A
 
For apps that sync data using Core Data and iCloud, it would be nice if the new background fetch mode would – when enabled – automatically update the data store. This could be something triggered by the developer's code in -application:performFetchWithCompletionHandler: or even better if it could happen without any additional code on the developer's part. This enhancement would greatly improve the user experience for apps that store most of their user-visible data in an iCloud-enabled Core Data store and it seems like a natural fit for the background processing mode introduced in iOS 7.

Some developers are leveraging background fetching by kicking off a timer when they get the call to -application:performFetchWithCompletionHandler:. If they see a NSPersistentStoreDidImportUbiquitousContentChangesNotification notification before the timer expires, they return  a result of UIBackgroundFetchResultNewData. Otherwise they return UIBackgroundFetchResultNoData.

See dev forum thread here: https://devforums.apple.com/thread/197095

This works reasonably well, but I think that with a bit of framework help as I described, we could avoid using timers.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!