I have an app which I want to work the same every time, regardless of whether or not iCloud is enabled. Thus, I want to store my core data persistent store in the same place with iCloud enabled as I would without it enabled.
If iCloud is enabled, calling
NSURL *iCloudURL = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier];
gives the result:
file://localhost/private/var/mobile/Library/Mobile%20Documents/12345~com~andrew~icloudid/
Calling this without iCloud enabled returns nil. I'd like to be able to access it when iCloud isn't enabled, to still use my core data store from there.