laucel
laucel

Reputation: 509

iCloud and lightweight migration

I've a published app synchronizing a Core Data with iCloud. I need to update the model adding two attributes and then populate these new fields.

I've tested lightweight migration locally and works fine, I can see the old data migrated into the new model scheme.

When I activate iCloud, old data saved in the ubiquity container doesn't sync with the new model schema. What is the expected behavior? Should I be able to sync data both on old and new model versions? How can I achieve it and test this situation?

I've read:

CoreData versioning and

Understanding Core Data iCloud Store Migration When Testing an iOS App Update

but, actually, I'm very confused.

Upvotes: 1

Views: 277

Answers (1)

Tom Harrington
Tom Harrington

Reputation: 70936

What's supposed to happen is that iCloud data only syncs between devices that are using the same version of the data model. If you upgrade the app on one device but not on a second device, they won't sync changes until the second device also updates to the new model version.

If that's not what you're seeing, please add more details about the problem you're seeing.

Upvotes: 4

Related Questions