I have an app that uses Core Data + iCloud to share data on multiple devices (say, a user with an iPhone and iPad using the same application).
My code does this by using NSPersistentStoreUbiquitousContentNameKey option, and does the necessary magic that was prescribed.
On iOS 10, I'm getting a message, which I'll summarize below (removing specifics mentioning my app name, etc.):
File presenter <PFUbiquityContainerIdentifier: XXXX>: <PFUbiquityLocation: XXXX>: [LONG PATH NAME].cid was still registered at the time this application was suspended, and implements one or more NSFilePresenter messages requiring a response. For NSFilePresenters for file system locations that are accessible to other processes (e.g. iCloud or group containers), you should either call removeFilePresenter: when the process is backgrounded, or remove any implementations of NSFilePresenter methods requiring a response. Otherwise, the system will kill your process instead of risking deadlock.
Since the only iCloud usage I'm doing is Core Data + iCloud, I decided to check the iOS 10 release notes (this seems to be a new message), and nothing was mentioned... except that all the NSPersistentStoreUbituitousContentXXX symbols are now deprecated. I checked the documentation, and indeed they are shown as documented, but no workaround is suggested.
I also checked the WWDC 2016 videos applicable to iCloud and Core Data, and nary a whisper was made regarding this deprecation.
So, I need to know the following...
Is Core Data + iCloud still supported?
What is the new, non-deprecated way for Core Data + iCloud?
How do I figure out the NSFilePresenter object being used so I can remove it in the proper place, and add it when the app enters foreground again? Or is Core Data supposed to do this automatically (just like UIDocument) and somebody forgot to implement this internally?
Is this a new example of Apple no longer supporting features it has touted in previous releases?
I hope an Apple Engineer is monitorying this. Right now, I'm trying to debug an issue, and as a start, want to remove these warning messages so that I can assume the bug is somewhere else in my code.