1

首先我不知道是什么导致了这个问题,我只能在设备硬件重启后重现它。在那之后应用程序很好。

  • 我使用 MagicalRecords 库。
  • “[MagicalRecordHelpers setupAutoMigratingCoreDataStack]”在“应用程序:didFinishLaunchingWithOptions:”中调用。
  • 经过几次内部方法调用后,它会冻结 10-15 秒。

这是来自控制台的日志,您可以在其中查看呼叫的详细信息和时间。我只是注意到它被一些奇怪的(对我来说)低级调用冻结了。

Apr 11 17:39:21 unknown MY_APP[130] <Warning>: didFinishLaunchingWithOptions: start
Apr 11 17:39:21 unknown MY_APP[130] <Warning>: didFinishLaunchingWithOptions: DATA > migration
Apr 11 17:39:21 unknown MY_APP[130] <Warning>: --- MR_coordinatorWithAutoMigratingSqliteStoreNamed
Apr 11 17:39:21 unknown MY_APP[130] <Warning>: --- MR_setDefaultStoreCoordinator
Apr 11 17:39:21 unknown MY_APP[130] <Warning>: --- MR_contextWithStoreCoordinator
Apr 11 17:39:21 unknown MY_APP[130] <Warning>: +[NSManagedObjectContext(MagicalRecord) MR_contextWithStoreCoordinator:](0x3ed04728) Creating MOContext  *** On Main Thread ***
Apr 11 17:39:21 unknown MY_APP[130] <Warning>: +[NSManagedObjectContext(MagicalRecord) MR_contextWithStoreCoordinator:](0x3ed04728) Creating context in Context Private Queue Mode
Apr 11 17:39:21 unknown MY_APP[130] <Warning>: --- MR_setDefaultContext
Apr 11 17:39:21 unknown librariand[132] <Notice>: changing log level to 5
Apr 11 17:39:22 unknown com.apple.launchd[1] <Warning>: (com.apple.ubd) Exited with code: 10
Apr 11 17:39:22 unknown com.apple.launchd[1] <Warning>: (com.apple.ubd) Throttling respawn: Will start in 10 seconds
> 
Apr 11 17:39:33 unknown librariand[132] <Error>: client process 130 does not have a valid com.apple.developer.ubiquity-container-identifiers entitlement
Apr 11 17:39:33 unknown librariand[132] <Error>: error in handle_container_path_request: LibrarianErrorDomain/9/The client process does not have a valid com.apple.developer.ubiquity-container-identifiers entitlement
Apr 11 17:39:33 unknown librariand[132] <Error>: client process 130 does not have a valid com.apple.developer.ubiquity-container-identifiers entitlement
Apr 11 17:39:33 unknown librariand[132] <Error>: error in handle_container_path_request: LibrarianErrorDomain/9/The client process does not have a valid com.apple.developer.ubiquity-container-identifiers entitlement
Apr 11 17:39:33 unknown MY_APP[130] <Warning>: --- setupCoreDataStackWithAutoMigratingSqliteStoreNamed END
Apr 11 17:39:33 unknown MY_APP[130] <Warning>: didFinishLaunchingWithOptions: DATA > prefilling
Apr 11 17:39:33 unknown MY_APP[130] <Warning>: didFinishLaunchingWithOptions: UI
Apr 11 17:39:33 unknown librariand[132] <Warning>: items added, refreshing item updates for file://localhost/private/var/mobile/Library/Mobile%20Documents/
Apr 11 17:39:33 unknown MY_APP[130] <Warning>: didFinishLaunchingWithOptions: end

我真的不知道用户是否会遇到这个问题。但是,如果这样做,对于其中许多人来说,它可能会在开始时崩溃。

我知道这个问题很难分析,但是如果您至少有任何相关的想法或只是一个想法,请分享。也请询问任何细节。

提前致谢。

4

1 回答 1

0

因此,看起来 iCloud 正在尝试在那里进行初始化。我听说这是一个问题,但是,Apple 建议在 NSFileManager 上调用 URLForUbiquityContainerIdentifier:。这就是该方法在幕后发生的事情,但似乎该方法在某些时候也令人窒息......除了在NSManagedObjectContext类别方法MR_observeiCloudChangesInCoordinator中,不知道该做什么,注释掉调用isICloudEnabled的行......这很可能是你现在的解决方案:(

于 2012-04-13T11:10:37.170 回答