Will migratePersistentStore: toURL: options: withType: error: overwrite the existing target store?

I have an existing iOS 7 app that uses master data (sqlite) locally.

I am considering adding iCloud support and am considering how to transfer local data to iCloud.

The method NSPersistentStoreCoordinator

migratePersistentStore:toURL:options:withType:error:

appears to do what I need, but after reading the documentation, I still don't understand what happens to the target persistent store if it already exists before the method is called.

If store B already contains data and I am migrating store A to store B, will the original data of store B be overwritten (so it now only contains data from store A), or will the method append / append data from store A to existing data from repository B?

+3


source to share





All Articles