I have an older Core Data / iCloud app that I wish to convert toi Core Data / CloudKit. I also want to do a major update to iOS 13.0
My questions are about the persistent store that is in 'ubiquity'.
In my app, the original path to the persistent store is
Original iCloud store path: /var/mobile/Containers/Data/Application/Blah1/Documents/iCloudStore.sqlite
However, I have to add the options for the persistent store coordinatoor as follows:
iCloudOptions = [NSDictionary dictionaryWithObjectsAndKeys:
@"iCloudStore", NSPersistentStoreUbiquitousContentNameKey, nil];
The path to the actual persistent store in upbiquity is now
Ubiquity iCloud store path: /var/mobile/Containers/Data/Application/Blah1/Documents/CoreDataUbiquitySupport/mobile~Blah2/iCloudStore/Blah3/store/iCloudStore.sqlite
NSPersistentStoreUbiquitousContentNameKey is deprecated.
The question is, can I just grab the persistent store that is in the Original location, or do I have to grab the persistent store that is in the Ubiquity location?
Also, if I need to get the Ubiquity store, can. I use NSPersistentStoreUbiquitousContentNameKey with a deployment target of 13.0?
Also, how do I delete the old iCloud data (or can I) for the user when the app starts using CloudKit?