简体   繁体   English

为什么我的iOS应用需要很长时间才能在设备上加载?

[英]Why is my iOS app taking a long time to load on my device?

I have an app, so far basic on technical grounds, that seems to take a long time to load. 到目前为止,我有一个基于技术基础的应用程序,似乎需要很长时间才能加载。 At present it displays a background image and shows 1-2 images on top of it, not much more sophisticated than a "Hello, World!" 目前,它显示背景图像,并在其顶部显示1-2张图像,比“ Hello,World!”复杂得多。 app. 应用程式。

The status in Xcode is "Waiting for ____________: ____________'s iPhone to launch", and it stays there for several minutes before finally waiting for it to launch. Xcode中的状态为“正在等待____________:____________的iPhone启动”,它停留了几分钟,直到最终等待启动。 This is with the device tethered to the computer. 这是与设备绑定到计算机的方式。 Xcode says, "No issues" to the right of that. Xcode在其右侧说“没有问题”。

The only thing I can think of that may need slimming down is several high-resolution images. 我唯一想到的可能是需要精简一些高分辨率图像。 I'm not doing anything particularly interesting besides displaying a shrunken version of one of them, and in the past I had what seemed like normal response times. 除了显示其中一个的缩小版本外,我没有做任何特别有趣的事情,并且在过去,我的响应时间看起来很正常。

Are there any obvious causes for why a starter app should take several minutes to get up and running on an iPhone? 是否有任何明显的原因导致启动器应用程序需要花费几分钟才能在iPhone上启动并运行?

Thanks, 谢谢,

I have 2 iPhones and one of them is behaving the same as yours. 我有2部iPhone,其中一部与您的iPhone相同。 The only difference is that the "slow" one has 350 or so apps installed and the fast one is almost clean. 唯一的区别是,“慢速”应用程序已安装了350个左右的应用程序,而快速速写的应用程序几乎是干净的。 I think this is the problem in my case. 我认为这是我的问题。 You can just reset all contents (no apps installed) just to check if it solves the problem in your case. 您可以重置所有内容(未安装任何应用程序)只是为了检查它是否解决了您的情况。

I don't know if it would account for "several minutes" but the time between compilation finishing and the app launching includes time to copy the app to the device, for the device to verify the code signature, and then for the debug server to launch, read in your whole app and start communicating with Xcode. 我不知道它是否会占“几分钟”,但是从编译完成到应用程序启动之间的时间包括将应用程序复制到设备,设备验证代码签名,然后供调试服务器使用的时间。启动,阅读整个应用程序并开始与Xcode进行通信。 In a large application with a lot of image resources, the time required to do these things can be quite noticeable (read: annoying as all get out.) None of those tasks needs to be done when simply launching a pre-existing, previously launched application, without a debugger. 在具有大量图像资源的大型应用程序中,执行这些操作所需的时间可能会非常明显(请阅读:烦人,因为全部退出。)仅启动预先存在的,先前已启动的这些任务都不需要执行应用程序,无需调试器。

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

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