Closed dfcarney closed 10 years ago
You can invoke
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:USMCloudEnabledKey];
before
-initStoreNamed:withManagedObjectModel:localStoreURL:containerIdentifier:additionalStoreOptions:delegate:
also, in you can set cloudEnabled
in willLoadStoreIsCloud:
Great, thanks! I figured out the solution that @arquebuse mentioned a while back, but it didn't seem ideal. Thanks to both of you.
By default, UbiquityStoreManager creates a local store. Instead, if iCloud is available and no local store exists, I'd like it to skip creating a local store and focus on iCloud. Is this possible?
Related, if a local store has to be created, is there a way to detect if it's empty? In particular, if the local store is empty and there's stuff in iCloud then calling setCloudEnabledAndOverwriteCloudWithLocalIfConfirmed: prompts the user to make a selection, which is unneccessary. I.e. in this case, setting cloudEnabled = YES would be preferable.