Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CoreData: Ubiquity: Using local storage: 1 never becomes 0

I am working on upgrading an App with iOS6's CoreData+iCloud to iOS7. According to the Apple's WWDC video, "CoreData: Ubiquity: Using local storage: 1" shall become "CoreData: Ubiquity: Using local storage: 0", when CoreData get ready the iCloud Core Data store.

I have successfully tested this on the simulator. The funny thing is that this never happens to my iPhone 5. I have checked the iCloud Settings in Setting, but still have no luck.

Image attached below is the screenshot from xCode's iCloud Debugging panel. Interestingly, there is a baseline.zip file that I could never get it Current. This shall be the zombie file from iOS6's iCloud... Is it related?

Any help is appreciated.

enter image description here Thank you.

like image 858
Cullen SUN Avatar asked Oct 09 '13 10:10

Cullen SUN


Video Answer


1 Answers

There are a few reasons this could be happening. The simulator may not have iCloud set up properly, but you said that it is, so I will write that one off. Another reason is that you have not enabled iCloud in the Target's Capabilities. Make sure that switch is on. Another cause could be that the simulator does not trigger iCloud sync automatically. Try going to Debug->Trigger iCloud Sync, or press Shft+Cmd+I.

Edit: If you want to use someone else's code (which I have found to be stable), look at this Github project: https://github.com/mluisbrown/iCloudCoreDataStack/blob/master/iCloudCoreDataStack/AppDelegate.m

like image 100
erdekhayser Avatar answered Oct 18 '22 19:10

erdekhayser