I am using two keys NSPersistentStoreUbiquitousContentNameKey and NSPersistentStoreUbiquitousContentURLKey to specify that persistent store has a given name and URL in ubiquity. But this keys are deprecated in iOS 10.0. So need to remove this deprecated api with alternate api.
-(NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
//Return if the persistance store exists.
if (__persistentStoreCoordinator != nil) {
return __persistentStoreCoordinator;
}
__persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel: [self managedObjectModel]];
NSPersistentStoreCoordinator *psc = __persistentStoreCoordinator;
NSMutableDictionary *options = [NSMutableDictionary dictionary];
[options setObject:iCloudEnabledAppID forKey:NSPersistentStoreUbiquitousContentNameKey];
[options setObject:iCloudLogsPath forKey:NSPersistentStoreUbiquitousContentURLKey];
[options setObject:NSFileProtectionComplete forKey:NSPersistentStoreFileProtectionKey];
[psc lock];
return __persistentStoreCoordinator;
}
I have gone through the release notes for iOS 10.0 but not found any workaround for this. Is there any alternate to these keys?