删除和部署应用程序后,iOS Core Data + iCloud中的错误消息

时间:2012-06-14 23:05:59

标签: objective-c core-data icloud

该应用程序从一开始就被放入iCloud,所以我有机会用数据填充它,并看到在其他设备上发生的同步。 但是,在仅在一台设备上删除和重新部署应用程序后,我开始遇到问题。

特别是,在启动时,它在这一点上需要花费很多时间:

NSLog(@"add coordinator");
if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error]) {
    NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
    abort();
}
NSLog(@"finish");

我可以在控制台中看到“添加协调器”,然后它似乎永远处于停顿状态。相反,通过激活核心数据记录,我可以看到它正在进行大量的选择和更新。

然后显示每个transactionNumber的无限日志错误消息列表:

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

然后正如我所说,打印出“完成”,应用程序根本没有任何数据。

1 个答案:

答案 0 :(得分:1)

一位Apple工程师回复了我在Apple Dev论坛上发表的一篇文章,指出这是一个已知错误,已在即将推出的iOS 6上修复。

因此,除了抓取设备上的所有数据并重新开始之外,没有任何解决方案。 此时,我想我将在没有iCloud的情况下发布CoreData。