添加多个窗格可将iOS应用程序启动时间增加10秒以上

我正在使用Cocoapods 0.37.2,Xcode 6.3.2在Swift 1.2中做一个iOS应用程序项目。 在我的项目中添加大约8个豆荚后,设备(iPhone 5)上的应用程序启动时间大大增加(大约10秒多)。 (注意:启动时间是指点击应用程序图标打开应用程序的时间)

这是如此缓慢的iOS终止它,因为它不及时启动。 崩溃日志的顶部如下…

Application Specific Information: com.tryslowappswift failed to launch in time Elapsed total CPU time (seconds): 27.720 (user 27.720, system 0.000), 68% CPU Elapsed application CPU time (seconds): 0.074, 0% CPU Thread 0: 0 dyld 0x1ff0f4c8 ImageLoaderMachOCompressed::rebase(ImageLoader::LinkContext const&) + 456 1 dyld 0x1ff087be ImageLoader::recursiveRebase(ImageLoader::LinkContext const&) + 174 2 dyld 0x1ff07dca ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&) + 186 3 dyld 0x1ff012fc dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&) + 204 4 dyld 0x1ff022d6 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 2362 5 dyld 0x1fefe222 dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 394 6 dyld 0x1fefe03c _dyld_start + 60 No thread state (register information) available ... 

你可以testing这个:

注意:我创build了一个示例Swift项目,其中包含所有在我的github仓库中设置的pod。 你可以克隆并运行在你的设备上,看看你自己的延迟。

  • 创build一个新的空白项目,没有在application:didFinishLaunchingWithOptions:方法
  • 运行设备上的应用程序,看到应用程序启动速度非常快。
  • 停止。 现在尝试添加一个大约8个豆荚的Podfile (不pipe豆荚是大还是小),执行pod install
  • 为了清楚起见,这是我使用的Podfile

Podfile

 source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! # required for Swift pods pod 'Alamofire', '~> 1.2.1' pod 'NPReachability', '~> 0.2.0' pod 'ActionSheetPicker-3.0', '~> 1.6.1' pod 'SDWebImage', '~> 3.7.2' pod 'KVNProgress', '~> 2.2.1' pod 'KeychainAccess' pod 'JazzHands', '~> 0.2.1' pod 'DGActivityIndicatorView' 
  • 然后再次在设备上运行。 这次你会注意到10+秒的延迟 ,甚至在application:didFinishLaunchingWithOptions:方法被调用之前。 没有import ,没有桥接头文件,只要安装到该项目的pod,并减缓发射( – 愤怒的家伙meme !!! —)

我怀疑这与Swift 1.2有关,所以我尝试了一个Objective-C项目,但是我仍然经历了同样的延迟。 这似乎发生在正常的pod安装后,我不知道如何优化或修复此问题。 🙁

更新1(2015年7月27日):

正如Bryan Musial所指出的那样,我尝试在模式设置中添加标志来logging每个库的加载时间。 我在iPhone 5上运行这个。下面是Xcode的“设备”窗口中的结果:

 Jul 27 13:56:02 Hlung SpringBoard[43] <Warning>: Installed apps did change. Added: {( )} Removed: {( )} Modified: {( "th.in.hlung.TrySlowAppSwift" )} Jul 27 13:56:03 Hlung com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 [4964] <Warning>: debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 for armv7. Jul 27 13:56:03 Hlung com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 [4964] <Warning>: Connecting to com.apple.debugserver service... Jul 27 13:56:03 Hlung com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 [4964] <Warning>: Got a connection, waiting for process information for launching or attaching. Jul 27 13:56:03 Hlung com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 [4964] <Warning>: About to launch process for bundle ID: th.in.hlung.TrySlowAppSwift Jul 27 13:56:03 Hlung com.apple.xpc.launchd[1] (UIKitApplication:th.in.hlung.TrySlowAppSwift[0x578b]) <Error>: The DisableASLR key is no longer respected. Please remove it. Jul 27 13:56:03 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:04 Hlung kernel[0] <Notice>: xpcproxy[4965] Container: /private/var/mobile/Containers/Data/Application/6C097544-9C1E-4B73-ACF8-43701FDFC8C2 (sandbox) Jul 27 13:56:04 Hlung com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 [4964] <Warning>: In completion handler, got pid for bundle id, pid: 4965. Jul 27 13:56:04 Hlung com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 [4964] <Warning>: Got a connection, launched process /private/var/mobile/Containers/Bundle/Application/9F233F77-63BC-479E-827A-F08C964DE38C/TrySlowAppSwift.app (pid = 4965). Jul 27 13:56:04 Hlung SpringBoard[43] <Warning>: LICreateIconForImage passed NULL CGImageRef image Jul 27 13:56:04 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:04 Hlung locationd[4692] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0 Jul 27 13:56:05 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:05 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:06 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:07 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:08 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:08 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:09 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:10 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:10 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:11 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:12 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:12 Hlung MobileMail[139] <Warning>: Attempting to badge the application icon but haven't received permission from the user to badge the application Jul 27 13:56:12 Hlung MobileMail[139] <Warning>: Attempting to badge the application icon but haven't received permission from the user to badge the application Jul 27 13:56:12 Hlung MobileMail[139] <Warning>: Attempting to badge the application icon but haven't received permission from the user to badge the application Jul 27 13:56:12 Hlung MobileMail[139] <Warning>: Attempting to badge the application icon but haven't received permission from the user to badge the application Jul 27 13:56:12 Hlung MobileMail[139] <Warning>: Attempting to badge the application icon but haven't received permission from the user to badge the application Jul 27 13:56:12 Hlung MobileMail[139] <Warning>: Attempting to badge the application icon but haven't received permission from the user to badge the application Jul 27 13:56:12 Hlung MobileMail[139] <Warning>: Attempting to badge the application icon but haven't received permission from the user to badge the application Jul 27 13:56:12 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:13 Hlung assistant_service[4931] <Warning>: the local store doesn't allow tasks and we have no default calendar :( Jul 27 13:56:13 Hlung assistant_service[4931] <Warning>: Error getting NanoAppRegistry workspace info: Error Domain=NSCocoaErrorDomain Code=4099 "The operation couldn't be completed. (Cocoa error 4099.)" (The connection to service named com.apple.nanoappregistry.workspace was invalidated.) UserInfo=0x17ebf490 {NSDebugDescription=The connection to service named com.apple.nanoappregistry.workspace was invalidated.} Jul 27 13:56:13 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:14 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:14 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:15 Hlung amfid[4918] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: dyld: loaded: /usr/lib/libcupolicy.dylib Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: dyld: loaded: /usr/lib/libTelephonyUtilDynamic.dylib Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total time: 13.1 seconds (100.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total images loaded: 149 (128 from dyld shared cache) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total segments mapped: 60, into 1700 pages with 112 pages pre-fetched Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total images loading time: 12.8 seconds (97.9%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total dtrace DOF registration time: 0.17 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total rebase fixups: 32,622 Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total rebase fixups time: 34.74 milliseconds (0.2%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total binding fixups: 121,320 Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total binding fixups time: 116.36 milliseconds (0.8%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total weak binding fixups time: 5.10 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total bindings lazily fixed up: 0 of 0 Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total initializer time: 118.97 milliseconds (0.9%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: libSystem.B.dylib Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: : 37.57 milliseconds (0.2%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: libBacktraceRecording.dylib Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: : 0.77 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: libc++.1.dylib Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: : 0.09 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: libobjc.A.dylib Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: : 0.10 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: CoreFoundation Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: : 0.88 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: vImage Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: : 0.02 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: libGLImage.dylib Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: : 0.12 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: libFosl_dynamic.dylib Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: : 0.04 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: CoreImage Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: : 0.02 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: libswiftCore.dylib Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: : 2.14 milliseconds (0.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total symbol trie searches: 43149 Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total symbol table binary searches: 0 Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total images defining weak symbols: 18 Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total images using weak symbols: 44 

最重要的部分可能是这样的:

 Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total time: 13.1 seconds (100.0%) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total images loaded: 149 (128 from dyld shared cache) Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total segments mapped: 60, into 1700 pages with 112 pages pre-fetched Jul 27 13:56:17 Hlung TrySlowAppSwift[4965] <Notice>: total images loading time: 12.8 seconds (97.9%) 

加载图像需要整整12.8秒(97.9%) 。 但是这个空的项目没有任何图像文件。 我通过豆荚浏览,我认为他们也没有大量的图像文件。 我还在这里

与Bryan的结果相比,相同的代码,但在iPhone 6上运行。图像加载时间百分比也很高。

 Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total time: 1.9 seconds (100.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total images loaded: 148 (127 from dyld shared cache) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total segments mapped: 60, into 1756 pages with 164 pages pre-fetched Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total images loading time: 1.5 seconds (81.6%) 

另外还有另一个线索。 在启animation面中,有多条日志行说<Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName] 。 谷歌search只是显示,这是一些企业应用程序的问题,这并没有多大帮助。

总的来说,我仍然卡住了。 T_T

有很多原因可能导致应用程序启动速度慢,如内存不足或磁盘空间不足,越狱和/或改装设备,需要全新安装的软件更新失败,甚至硬件故障。 虽然您提供的信息不多,但您可以通过一些方法来消除潜在的原因。

我已经克隆了您的示例项目,并在iPhone 5到iPhone 6 Plus的设备上进行testing,虽然我无法复制您在本地观察到的缓慢行为,但我一直处于外部和内部因素都导致启动速度缓慢的情况性能。

首先,考虑到我们只有一部分crashlog,你应该做一些快速的validation,以确保我们正在进入正确的调查path(理想情况下,这将是有益的,看到完整的crashlog) – 如您可能或可能不知道,iOS采用了一个看门狗进程来确保iOS应用程序在合理的时间内响应。 当debugging监视程序限制不强制允许Xcode需要build立一个实时debugging会话的时间。 作为一个独立的应用程序启动,也就是在debugging器之外,看门狗限制是完全有效的。 看看你的crashlog,并检查exception代码是0x8badf00d(阅读:“吃不好的食物”) – 在64位设备上,这个代码将被前导零填充:0x000000008badf00d

通过TN2151>例外代码 :

exception代码0x8badf00d表示应用程序已被iOS终止,因为发生了看门狗超时。 应用程序花了太长时间才能启动,终止或响应系统事件。 一个常见的原因是在主线程上进行同步联网。 无论线程0上的操作如何:需要移动到后台线程,或者以不同的方式进行处理,这样就不会阻塞主线程。

正如你已经指出的application:didFinishLaunchingWithOptions:直到等待10多秒后才会被触发,这表明延迟正在发生,而应用程序的引导正在发生 – 您的crashlog摘录似乎一致。 TrySlowSwiftApp.app的线程0仅包含dynamic链接编辑器dyld栈帧。 你也想确保你的crashlog指出线程0是触发崩溃的帧(我不记得遇到线程0不被指责的看门狗崩溃,但我想这是可能的!)。 如果另一个线程被指责,那么我们需要更多地了解你手上的crashlog。

TN2239与大量的iOSdebugging工具进行对话,并且包含dynamic链接器的一部分环境variables – 我们希望将当前运行scheme的DYLD_PRINT_STATISTICS值添加为YES

Xcode 6 Scheme环境变量编辑器

我们还应该在计划的诊断编辑器中启用“日志库负载”:

Xcode 6方案诊断编辑器

最后,Xcode的控制台在In-Xcode Console中不包含时间戳信息。 但是,您可以使用Xcode的“设备”屏幕查看带有时间戳的实时控制台:

Xcode 6设备控制台

我们添加的环境variables将为您提供有关dyld花费时间的统计信息,而“Log Library Loads”选项将显示正在尝试加载的特定库。 由于您正在设备控制台中查看此信息,因此您可以查看与每个日志条目相关的时间戳。

在dynamic统计信息输出中,查找在您的设备上执行exception时间的操作 – 仅供参考,这是我的iPhone 6上的一个负载:

 Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total time: 1.9 seconds (100.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total images loaded: 148 (127 from dyld shared cache) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total segments mapped: 60, into 1756 pages with 164 pages pre-fetched Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total images loading time: 1.5 seconds (81.6%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total dtrace DOF registration time: 0.06 milliseconds (0.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total rebase fixups: 32,521 Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total rebase fixups time: 24.03 milliseconds (1.2%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total binding fixups: 120,894 Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total binding fixups time: 190.36 milliseconds (9.8%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total weak binding fixups time: 1.76 milliseconds (0.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total bindings lazily fixed up: 0 of 0 Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total initializer time: 137.82 milliseconds (7.1%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: libSystem.B.dylib Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: : 60.11 milliseconds (3.1%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: libBacktraceRecording.dylib Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: : 0.39 milliseconds (0.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: libc++.1.dylib Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: : 0.27 milliseconds (0.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: libobjc.A.dylib Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: : 0.03 milliseconds (0.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: CoreFoundation Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: : 3.40 milliseconds (0.1%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: vImage Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: : 0.31 milliseconds (0.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: libGLImage.dylib Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: : 0.08 milliseconds (0.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: libFosl_dynamic.dylib Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: : 0.01 milliseconds (0.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: CoreImage Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: : 0.57 milliseconds (0.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: libswiftCore.dylib Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: : 1.74 milliseconds (0.0%) Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total symbol trie searches: 42394 Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total symbol table binary searches: 0 Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total images defining weak symbols: 17 Jul 22 16:44:02 iPhone-6 TrySlowAppSwift[939] <Notice>: total images using weak symbols: 44 

在'dyld:loaded:'行中,查看每个加载的项目的时间戳记 – 您正在寻找加载资源所花的时间比周围资源所需的时间更长的地方。

根据您使用这些诊断工具发现的内容,将有助于确定下一个诊断步骤应该是什么 – 根据这些步骤收集的其他信息,您可以随时进行解释。

正如其他人所build议的那样,我会首先仔细检查第二个相同型号和操作系统设备上的行为 – 只是为了排除某些设备的具体情况。 如果您可以在那里复制它,那么您应该花更多时间进行软件调查,但是如果不能在那里进行复制,则应该引导您的时间来诊断受影响的设备。 更严重的诊断步骤可能涉及擦拭设备并执行干净的iOS安装。 如果你这样做,我会准备做至less两次 – 第一次从iCloud或iTunes备份恢复并重新testing启动行为,然后再次重新加载以将内容恢复到设备。

经过一番研究,我发现这个问题实际上不是在cocoapods中,而是在embedded式库(我能够重现与迦太基相同的问题)。

它不是在所有设备上重现(可能只有在32位)。 而这个问题不会影响app store的构build。 虽然它使发展速度稍慢,但并不是那么有害。

https://forums.developer.apple.com/message/64556#64556 https://forums.developer.apple.com/message/82399#82399

这里有很多的讨论: https : //github.com/artsy/eigen/issues/586

可能有一个Pod增加了发射时间(在最坏的情况下更多的Pod)。 我的build议是,如果你的问题是固定的,一个接一个地去除豆荚。 也许创build另一个项目来做这个testing更容易。

如果你有一个使用-all_load连接器标志的框架或Pod,那么增加大量启动时间是一个很大的机会。