Question

How do I find the same NSManagedObject object across 2 devices? I tried to save the [object objectID.URIRepresentation.absoluteString] but it doesn't seem to be consistent across stores ... when I load up [managedObjectContext objectWithURI] with the same URI on another device, it points to a different object.

I'm guessing the problem is that the 2 devices point to a different store on each device. So what would be the best way to make it consistent across both devices?

Was it helpful?

Solution 2

It seems that the 2 devices have two different stores, so the URIs won't match across devices. Creating your own GUID attribute, and fetching based on that GUID, is the only way to go.

OTHER TIPS

It seems that your two objects were not synchronized correctly from the beginning. You can always simply include your own unique ID scheme and make sure duplicates are removed as required.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top