Search code examples
ioscore-dataicloud

Sharing/Invite CoreData iCloud documents with others


With with my coreData file syncing to iCloud, can I send a link to that file or an invite to a friend (who has a different iCloud account) so we can share that info through the app?


Solution

  • No, you cannot do that. iCloud does not allow direct file sharing links like Dropbox. Also, you should not be directly syncing a CoreData sqlite file. CoreData has its own syncing mechanism for iCloud, and you should not sync it as a whole file. From Apple's documentation:

    You cannot simply move or copy an existing database file to iCloud. Instead, you should use NSPersistentStoreCoordinator's migratePersistentStore:toURL:options:withType:error: method to migrate the database to the required location.

    http://developer.apple.com/library/ios/#releasenotes/DataManagement/RN-iCloudCoreData/index.html