Search code examples
core-dataicloudmagicalrecord

Does MagicalRecord support auto-migration and iCloud at the same time?


I am building an app using CoreData and Magical Record. So far I am setting up the stack by calling:

  • (void) setupCoreDataStackWithAutoMigratingSqliteStoreNamed:(NSString *)storeName;

But I would also like to use iCloud to sync the store. But I need ti setup the stack using autoMigration since the app will be expanding and growing and new versions of he database schema will be required.

The only way I can find to use iCloud with MagicalRecord is to set up the core data stack using

  • (void) setupCoreDataStackWithiCloudContainer:(NSString *)icloudBucket localStoreNamed:(NSString *)localStore;

Or one of the other iCloud container methods. So how do I set up iCloud sync with my core data store and still use auto-migration?


Solution

  • The iCloud scenario needs to be revisited sometime soon. The changes/fixes to iCloud and CoreData in iOS7 made things far easier than they used to be, and the library needs to be updated to reflect that.

    If you want to use MagicalRecord and iCloud for now, you can setup an auto migrating stack, and simply add an iCloud enabled persistent store.