Reputation: 9857
The application has been put in iCloud since the beginning, so I have the opportunities to fill it with data, and see synchronization happening on other devices. However I am starting to have problems after deleting and redeploying the application on one device only.
In particular, at startup, it's taking a lot at this point:
NSLog(@"add coordinator");
if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error]) {
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
NSLog(@"finish");
I can see "add coordinator" in console, then it seems to be in pause forever. Instead by activating core data logging, I can see that is doing a lot of select and update.
Then an infinite list of log error messages for each transactionNumber is shown:
CoreData: Ubiquity: Error importing transaction log: <PFUbiquityTransactionLog: 0x1929e350>
transactionLogLocation: <PFUbiquityLocation: 0x17bf1c40>: /private/var/mobile/Library/Mobile Documents/6G8M57K6MU~myapp/mobile.63606F7B-D6A9-5937-9160-126AC1315EBF/myAppCloud/3IEWV8FXM6GJ58H5PkyqFsyuoUZ2qIOuJOfon1QIYC4=/035A5A1C-F893-4B67-A784-866A4DE1B3F1.1.cdt
transactionNumber: 1
, exception: -[__NSCFDictionary setObject:forKey:]: attempt to insert nil key
-[_PFUbiquityRecordsImporter operation:failedWithError:](839): CoreData: Ubiquity: Import operation encountered an error: Error Domain=NSCocoaErrorDomain Code=134060 "The operation couldn’t be completed. (Cocoa error 134060.)" UserInfo=0x194c9f40 {exception=-[__NSCFDictionary setObject:forKey:]: attempt to insert nil key} while trying to import the log file at the URL: <PFUbiquityTransactionLog: 0x1929e350>
transactionLogLocation: <PFUbiquityLocation: 0x17bf1c40>: /private/var/mobile/Library/Mobile Documents/6G8M57K6MU~myapp/mobile.63606F7B-D6A9-5937-9160-126AC1315EBF/myAppCloud/3IEWV8FXM6GJ58H5PkyqFsyuoUZ2qIOuJOfon1QIYC4=/035A5A1C-F893-4B67-A784-866A4DE1B3F1.1.cdt
transactionNumber: 1
Then as I said, the "finish" is printed, and the app doesn't to have any data at all.
Upvotes: 3
Views: 851
Reputation: 9857
An Apple engineer replied me to a post I did on Apple Dev forum, stating that this is a known bug that has been fixed on forthcoming iOS 6.
So, there's no solution than scratching all data on devices and start again. At this point, I suppose I will ship with CoreData without iCloud.
Upvotes: 1