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

I am working on updating the application from iOS6 CoreData + iCloud to iOS7. According to Apple's WWDC video, “CoreData: Ubiquity: using local storage: 1” will become “CoreData: Ubiquity: using local storage: 0” when CoreData is preparing an iCloud Core data warehouse.

I successfully tested this on a simulator. The funny thing is that this never happens with my iPhone 5. I checked iCloud settings in Settings , but still no luck.

Below is a screen shot of the Xcode iCloud Debugging panel. Interestingly, there is a baseline.zip file that I could never get Current . It must be a zombie file from iOS6 iCloud ... Is it connected?

Any help is appreciated.

enter image description here Thanks.

+6
source share
2 answers

There are several reasons why this can happen. The simulator may not have iCloud installed correctly, but you said that it is, so I will write this. Another reason is because you haven’t included iCloud in your targeted features. Make sure the switch is on. Another reason may be that the simulator does not start iCloud sync automatically. Try going to Debug-> Trigger iCloud Sync or press Shft + Cmd + I.

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

+2
source

I have this problem when my iPhone uses only cellular. If I turn on Wi-Fi, it will work. This is very disappointing!

0
source

Source: https://habr.com/ru/post/955558/


All Articles