gpt4 book ai didi

iOS 应用程序在 "setupAutoMigratingCoreDataStack"行启动时卡住 10 秒

转载 作者:行者123 更新时间:2023-11-28 17:34:51 24 4
gpt4 key购买 nike

首先,我不知道是什么原因导致了这个问题,只有在设备硬件重启后我才能重现它。之后该应用程序就没问题了。

  • 我使用 MagicalRecords 库。
  • [MagicalRecordHelperssetupAutoMigratingCoreDataStack]”在“application: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

我真的不知道用户是否遇到这个问题。但是,如果这样做,其中许多人可能会在启动时崩溃。

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

提前致谢。

最佳答案

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

关于iOS 应用程序在 "setupAutoMigratingCoreDataStack"行启动时卡住 10 秒,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10108459/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com