Question

I've got iCloud set up with Core Data, but it never seems to switch to use the ubiquitous storage from the local storage. Looking at the iCloud panel in Xcode I can see the iCloud status is Idle, and I can even see that directories are being created inside my ubiquitous container (NSPersistentStoreUbiquitousContentNameKey), but there is never any activity (uploads or downloads) on the graph.

I'm only getting the following in the console:

-[PFUbiquitySwitchboardEntryMetadata setUseLocalStorage:](760): CoreData: Ubiquity:  me~3C82877D-69EE-5968-A69C-37FD71227462:MyApp
Using local storage: 1

I'm expecting it to eventually flip to not use local storage, but this never happens.

Setting the ubiquity log level to 3, I can see the following logs in my console:

__60-[PFUbiquitySetupAssistant canReadFromUbiquityRootLocation:]_block_invoke(1289): CoreData: Ubiquity:  Coordinated read finished for ubiquity root url: file:///Users/me/Library/Mobile%20Documents/VK94X636H2~com~company~MyApp/
-[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:](1081): CoreData: Ubiquity:  Post store setup succeded. <NSSQLCore: 0x10040bc90> (URL: file:///Users/me/Library/Containers/com.company.MyApp/Data/Library/Application%20Support/CoreDataUbiquitySupport/me~3C82877D-69EE-5968-A69C-37FD71227462/MyApp/33D95E86-2331-4ED6-9ECF-FC88E130A38F/store/MyApp.storedata)
-[PFUbiquitySetupAssistant canReadFromUbiquityRootLocation:](1298): CoreData: Ubiquity:  Read finished: 1
-[PFUbiquitySetupAssistant canReadFromUbiquityRootLocation:](1301): CoreData: Ubiquity:  Read finished: 1 / 1 / file:///Users/me/Library/Mobile%20Documents/VK94X636H2~com~company~MyApp/CoreData/MyApp/
-[PFUbiquitySetupAssistant canReadFromUbiquityRootLocation:](1305): CoreData: Ubiquity:  Blocking for initial sync: <PFUbiquitySetupAssistant: 0x10021edc0>

So it seems it's stuck on the Blocking for initial sync, but I'm not sure why.

Does anyone know what might be wrong?

Was it helpful?

Solution

Well, it turned out that simply restarting my Mac fixed this problem.

A little concerning given iCloud's reputation, but at least it is working! It appears that even after the improvements to iCloud in iOS 7 and OS X 10.9 there's still some strange issues going on.

OTHER TIPS

I've got pretty much the same issue but on an iOS 7.0.6.

Another strange, possibly related thing, is that in the iOS device when I go to: "Settings > iCloud > Documents & Data", My app seems to be listed there but the name is 'blank' (so the row is just an icon and a switch).

Restarting the device does not help, neither does removing/adding the iCloud account. And I can't find any other mention of Blocking for initial sync other than this page.

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