我在使用 CoreData 和 iCloud 时遇到了一些问题。
该应用程序过去运行良好,但一些用户报告数据不再同步。启用调试登录(设置运行时参数 -com.apple.coredata.ubiquity.logLevel 3 )后,我设法从应用程序中收到一条错误消息:
2012-09-02 11:47:17.835 MyApp[29365:1a0f] -[_PFUbiquityRecordsImporter canProcessTransactionLogWithScore:afterLogWithScore:](364): CoreData: Ubiquity: <_PFUbiquityRecordsImporter: 0xd692b60>:
ubiquityRootLocation: <PFUbiquityLocation: 0xd6912e0>: /private/var/mobile/Library/Mobile Documents/ATCS9MGY4M~com~MyApp~MyApp/Data/4D90DDAD-FA00-49FF-9AEA-973ED3AE5A92
localPeerID: mobile.A9EC2335-92F9-5098-BF24-48D49DD7D170
Can't process log with score: {
"mobile.A1F36BF9-B200-57C7-9A56-B6993451AA3D" = 4;
"mobile.A9EC2335-92F9-5098-BF24-48D49DD7D170" = "-58";
} after log with score: {
}
It is ahead of the local peer.
2012-09-04 21:47:17.853 MyApp[29365:1a0f] -[_PFUbiquityRecordsImporter createSortedOperationsArrayForLogLocations:](317): CoreData: Ubiquity: <_PFUbiquityRecordsImporter: 0xd692b60>:
ubiquityRootLocation: <PFUbiquityLocation: 0xd6912e0>: /private/var/mobile/Library/Mobile Documents/ATCS9MGY4M~com~MyApp~MyApp/Data/4D90DDAD-FA00-49FF-9AEA-973ED3AE5A92
localPeerID: mobile.A9EC2335-92F9-5098-BF24-48D49DD7D170
Giving up on operations:
(
"<_PFUbiquityRecordImportOperation: 0x2953c0>:\n\tlocalPeerIID: mobile.A9EC2335-92F9-5098-BF24-48D49DD7D170\n\tlogScore: {\n \"mobile.A1F36BF9-B200-57C7-9A56-B6993451AA3D\" = 4;\n \"mobile.A9EC2335-92F9-5098-BF24-48D49DD7D170\" = \"-58\";\n}\ntransactionLog: <PFUbiquityTransactionLog: 0x293f90>\n\ttransactionLogLocation: <PFUbiquityLocation: 0x2b3b20>: /private/var/mobile/Library/Mobile Documents/ATCS9MGY4M~com~MyApp~MyApp/Data/4D90DDAD-FA00-49FF-9AEA-973ED3AE5A92/mobile.A1F36BF9-B200-57C7-9A56-B6993451AA3D/4D90DDAD-FA00-49FF-9AEA-973ED3AE5A92/ZaJyBZ6MYNgth0Eai8Icgg2c1C~09IqT5LmGkD2D56I=/779B2C07-A286-4826-98D4-91BA461645E3.1.cdt\n\ttransactionNumber: 7\n\n",
"<_PFUbiquityRecordImportOperation: 0x292350>:\n\tlocalPeerIID: mobile.A9EC2335-92F9-5098-BF24-48D49DD7D170\n\tlogScore: {\n \"mobile.A1F36BF9-B200-57C7-9A56-B6993451AA3D\" = 5;\n \"mobile.A9EC2335-92F9-5098-BF24-48D49DD7D170\" = \"-58\";\n}\ntransactionLog: <PFUbiquityTransactionLog: 0x290f00>\n\ttransactionLogLocation: <PFUbiquityLocation: 0x2b11e0>: /private/var/mobile/Library/Mobile Documents/ATCS9MGY4M~com~MyApp~MyApp/Data/4D90DDAD-FA00-49FF-9AEA-973ED3AE5A92/mobile.A1F36BF9-B200-57C7-9A56-B6993451AA3D/4D90DDAD-FA00-49FF-9AEA-973ED3AE5A92/ZaJyBZ6MYNgth0Eai8Icgg2c1C~09IqT5LmGkD2D56I=/9AF49529-06D2-479D-B9D9-B43E18611172.1.cdt\n\ttransactionNumber: 8\n\n",
)
Due to incompatible operation: <_PFUbiquityRecordImportOperation: 0x2953c0>:
localPeerIID: mobile.A9EC2335-92F9-5098-BF24-48D49DD7D170
logScore: {
"mobile.A1F36BF9-B200-57C7-9A56-B6993451AA3D" = 4;
"mobile.A9EC2335-92F9-5098-BF24-48D49DD7D170" = "-58";
}
transactionLog: <PFUbiquityTransactionLog: 0x293f90>
transactionLogLocation: <PFUbiquityLocation: 0x2b3b20>: /private/var/mobile/Library/Mobile Documents/ATCS9MGY4M~com~MyApp~MyApp/Data/4D90DDAD-FA00-49FF-9AEA-973ED3AE5A92/mobile.A1F36BF9-B200-57C7-9A56-B6993451AA3D/4D90DDAD-FA00-49FF-9AEA-973ED3AE5A92/ZaJyBZ6MYNgth0Eai8Icgg2c1C~09IqT5LmGkD2D56I=/779B2C07-A286-4826-98D4-91BA461645E3.1.cdt
transactionNumber: 7
任何人都知道如何减轻这些错误消息的影响或根本原因是什么;
- “它领先于当地同行。”
- “由于不兼容的操作:<_PFUbiquityRecordImportOperation:”
谢谢