简体   繁体   English

iPhone 4 vs iPhone 5 TestFlight问题

[英]iPhone 4 vs iPhone 5 TestFlight issue

Distributed a build through TestFlight. 通过TestFlight分发了一个版本。 The ad-hoc build works fine on iPhone 5,but will open and then crash on iPhone 4 and 4s. 临时构建在iPhone 5上可以正常运行,但会在iPhone 4和4s上打开然后崩溃。 If compiled and run through Xcode (directly to Phone with dev provisioning profile) the build runs on both iPhone 5, 4s and 4. 如果编译并通过Xcode运行(直接使用开发配置文件发送到Phone),则该版本可以在iPhone 5、4s和4上运行。

Has anyone ran into this? 有人遇到过这个吗?

The first thing to do debugging testflight errors (or any other, for that matter) is to get the error log, and read and understand the error message. 调试testflight错误(或其他任何原因)的第一件事是获取错误日志,并阅读和理解错误消息。 In this case the error is: 在这种情况下,错误是:

failed to launch in time

If your app doesn't finish starting up (I believe this is essentially return from the application:DidFinishLaunchingWithOptions: method) in a certain amount of time, it's killed by the system. 如果您的应用在一定时间内没有完成启动(我相信这实际上是从application:DidFinishLaunchingWithOptions:方法返回),它将被系统杀死。 Either you have an infinite loop or you are trying to do way too much in that method. 您有一个无限循环,或者您试图在该方法中做太多事情。 In this case, the app caches images in that method, which evidently is fast enough to finish in time on the iPhone 5 but not earlier ones. 在这种情况下,应用程序会以该方法缓存图像,显然,该速度足够快,可以在iPhone 5上及时完成,但不能早于早期版本。 The solution is to queue a dispatch_async call (see Dispatch Queues ) that caches the images in the background, and return quickly from the app launch method. 解决方案是将在后台缓存图像的dispatch_async调用排队(请参阅Dispatch Queues ),然后从应用程序启动方法快速返回。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM