iCloud超时。(iCloud Time out. (using iCloud + Core Data + Magical Record)

编程入门 行业动态 更新时间:2024-10-15 12:29:42
iCloud超时。(iCloud Time out. (using iCloud + Core Data + Magical Record)

我开始了使用Core Data和iCloud (使用魔法记录)的应用测试。 在配置Provisioning Profiles和Entitlements的许多麻烦之后,应用程序终于运行。 经过一段时间的应用程序崩溃并抛出此消息::

2012-12-31 03:42:07.079 iCloudTest[252:1103] -[PFUbiquitySafeSaveFile waitForFileToUpload:](268): CoreData: Ubiquity: <PFUbiquityPeerReceipt: 0x1cd5a420>(0) permanentLocation: <PFUbiquityLocation: 0x1cd57b30>: /private/var/mobile/Library/Mobile Documents/MA5BADG5AW~com~gazapps~iCloudTest/mobile.4088E03C-763E-5A81-BB1B-64CABAFA73E3/com.gazapps.iCloudTest/v8GumdiUYmkE0aO9iGtPTPHX07qqWk7kRytsQwHKjwU=/receipt.0.cdt safeLocation: <PFUbiquityLocation: 0x1cd57a80>: /private/var/mobile/Library/Mobile Documents/MA5BADG5AW~com~gazapps~iCloudTest/mobile.4088E03C-763E-5A81-BB1B-64CABAFA73E3/com.gazapps.iCloudTest/v8GumdiUYmkE0aO9iGtPTPHX07qqWk7kRytsQwHKjwU=/mobile.4088E03C-763E-5A81-BB1B-64CABAFA73E3.0.cdt currentLocation: <PFUbiquityLocation: 0x1cd57a80>: /private/var/mobile/Library/Mobile Documents/MA5BADG5AW~com~gazapps~iCloudTest/mobile.4088E03C-763E-5A81-BB1B-64CABAFA73E3/com.gazapps.iCloudTest/v8GumdiUYmkE0aO9iGtPTPHX07qqWk7kRytsQwHKjwU=/mobile.4088E03C-763E-5A81-BB1B-64CABAFA73E3.0.cdt kv: (null) Safe save failed for file, error: Error Domain=NSCocoaErrorDomain Code=512 "The file upload timed out." UserInfo=0x1cd5b7d0 {NSLocalizedDescription=The file upload timed out.} 2012-12-31 03:42:07.083 iCloudTest[252:1103] +[MagicalRecord(ErrorHandling) defaultErrorHandler:](0xe5ac0) Error: The file upload timed out. 2012-12-31 03:42:07.085 iCloudTest[252:1103] +[MagicalRecord(ErrorHandling) defaultErrorHandler:](0xe5ac0) Error Message: The file upload timed out. 2012-12-31 03:42:07.086 iCloudTest[252:1103] +[MagicalRecord(ErrorHandling) defaultErrorHandler:](0xe5ac0) Error Domain: NSCocoaErrorDomain 2012-12-31 03:42:07.087 iCloudTest[252:1103] +[MagicalRecord(ErrorHandling) defaultErrorHandler:](0xe5ac0) Recovery Suggestion: (null) 2012-12-31 03:42:07.089 iCloudTest[252:907] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array' *** First throw call stack: (0x3a7702a3 0x3465f97f 0x3a6bae8d 0xdd453 0x38a6311f 0x38a624b7 0x38a671bd 0x3a743f3b 0x3a6b6ebd 0x3a6b6d49 0x38a842eb 0x338f62f9 0xd101d 0x37f22b20) libc++abi.dylib: terminate called throwing an exception

我使用这种方法来设置核心数据堆栈:

[MagicalRecord setupCoreDataStackWithiCloudContainer:@"XXXXXXXX.com.gazapps.iCloudTest" localStoreNamed:@"PersonDB.sqlite"];

任何人都有这个问题?

Enviroment: OSX 10.8.2, Xcode 4.5.2, app -> iOS 6, device -> iPhone 4S

I started an app test to use Core Data and iCloud (using Magical Records). After a lot of troubles to configure Provisioning Profiles and Entitlements, the app finally runs. After a while the app crash and throw this message::

2012-12-31 03:42:07.079 iCloudTest[252:1103] -[PFUbiquitySafeSaveFile waitForFileToUpload:](268): CoreData: Ubiquity: <PFUbiquityPeerReceipt: 0x1cd5a420>(0) permanentLocation: <PFUbiquityLocation: 0x1cd57b30>: /private/var/mobile/Library/Mobile Documents/MA5BADG5AW~com~gazapps~iCloudTest/mobile.4088E03C-763E-5A81-BB1B-64CABAFA73E3/com.gazapps.iCloudTest/v8GumdiUYmkE0aO9iGtPTPHX07qqWk7kRytsQwHKjwU=/receipt.0.cdt safeLocation: <PFUbiquityLocation: 0x1cd57a80>: /private/var/mobile/Library/Mobile Documents/MA5BADG5AW~com~gazapps~iCloudTest/mobile.4088E03C-763E-5A81-BB1B-64CABAFA73E3/com.gazapps.iCloudTest/v8GumdiUYmkE0aO9iGtPTPHX07qqWk7kRytsQwHKjwU=/mobile.4088E03C-763E-5A81-BB1B-64CABAFA73E3.0.cdt currentLocation: <PFUbiquityLocation: 0x1cd57a80>: /private/var/mobile/Library/Mobile Documents/MA5BADG5AW~com~gazapps~iCloudTest/mobile.4088E03C-763E-5A81-BB1B-64CABAFA73E3/com.gazapps.iCloudTest/v8GumdiUYmkE0aO9iGtPTPHX07qqWk7kRytsQwHKjwU=/mobile.4088E03C-763E-5A81-BB1B-64CABAFA73E3.0.cdt kv: (null) Safe save failed for file, error: Error Domain=NSCocoaErrorDomain Code=512 "The file upload timed out." UserInfo=0x1cd5b7d0 {NSLocalizedDescription=The file upload timed out.} 2012-12-31 03:42:07.083 iCloudTest[252:1103] +[MagicalRecord(ErrorHandling) defaultErrorHandler:](0xe5ac0) Error: The file upload timed out. 2012-12-31 03:42:07.085 iCloudTest[252:1103] +[MagicalRecord(ErrorHandling) defaultErrorHandler:](0xe5ac0) Error Message: The file upload timed out. 2012-12-31 03:42:07.086 iCloudTest[252:1103] +[MagicalRecord(ErrorHandling) defaultErrorHandler:](0xe5ac0) Error Domain: NSCocoaErrorDomain 2012-12-31 03:42:07.087 iCloudTest[252:1103] +[MagicalRecord(ErrorHandling) defaultErrorHandler:](0xe5ac0) Recovery Suggestion: (null) 2012-12-31 03:42:07.089 iCloudTest[252:907] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array' *** First throw call stack: (0x3a7702a3 0x3465f97f 0x3a6bae8d 0xdd453 0x38a6311f 0x38a624b7 0x38a671bd 0x3a743f3b 0x3a6b6ebd 0x3a6b6d49 0x38a842eb 0x338f62f9 0xd101d 0x37f22b20) libc++abi.dylib: terminate called throwing an exception

I used this method to setup Core Data Stack:

[MagicalRecord setupCoreDataStackWithiCloudContainer:@"XXXXXXXX.com.gazapps.iCloudTest" localStoreNamed:@"PersonDB.sqlite"];

Anyone ever had this problem?

Enviroment: OSX 10.8.2, Xcode 4.5.2, app -> iOS 6, device -> iPhone 4S

最满意答案

是的,比我想要回忆的还要多。

这意味着Core Data的内部部件无法以某种模糊不清的方式连接到iCloud。 没有恢复途径或解决方法 - 您只需稍后再试。 这些错误不是来自Magical Record或您的代码,而是内部Core Data / iCloud失败。

这是事情: 这并不意味着你做错了什么。 而其中的必然结果是, 你无法解决这个问题 。 在使用Core Data和iCloud 时,有时候会发生这种情况 ,您只需要处理它。 提出一个错误,并向任何你相信的神或神祈祷他们有一天会修复它。 使用iCloud的核心数据基本上是片状的,你遇到了最疯狂的部分之一。

有时再次尝试拨打电话会有所帮助。 但是魔法记录会返回void ,因此在代码中检测失败并不像您希望的那样简单。

在测试过程中,它可能有助于从iCloud中删除所有应用程序的数据,以开始清理。 您可以在iOS设置 - > iCloud - >存储和备份 - >管理存储 - >(您的应用程序名称在这里) - >编辑 - >全部删除中执行此操作。 另外请务必查看http://developer.icloud.com/以查看云中存在的内容。 此外,当您遇到问题时,请务必从设备中删除您的应用程序,以避免旧数据出现。

Yes, more times than I care to recall.

What this means is that Core Data's internals failed to connect to iCloud in some obscure and undocumented way. There's no recovery path or fix-- you just get to try again later. Those errors don't come from Magical Record or your code, they're an internal Core Data / iCloud failure.

Here's the thing: This does not mean you did something wrong. And the corollary of that is, there is nothing you can do to fix it. When using iCloud with Core Data, this just happens sometimes, and you just have to deal with it. File a bug and pray to whatever god or gods you believe in that they fix it some day. Core Data with iCloud is just fundamentally flaky and you're encountering one of the most maddening parts.

Sometimes it helps to just try the call again. But Magical Record returns void, so detecting failure in code is not as simple as you might hope.

During testing, it might help to delete all of your app's data from iCloud, to start clean. You do this in iOS at Settings --> iCloud --> Storage & Backup --> Manage Storage --> (your app name here) --> Edit --> Delete All. Also be sure to check out http://developer.icloud.com/ to see what's present in the cloud. Also, when you're having problems, be sure to delete your app from the device so that no old data is sitting around.

更多推荐

本文发布于:2023-08-07 17:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465385.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Core   Time   iCloud   Record   Magical

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!