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

时间:2021-01-22 20:39:47

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!" app.

我有一个应用程序,到目前为止基于技术理由,似乎需要很长时间才能加载。目前它显示一个背景图像,并在其上显示1-2个图像,没有比“你好,世界!”更复杂。应用程序。

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. This is with the device tethered to the computer. Xcode says, "No issues" to the right of that.

Xcode中的状态是“等待____________:____________的iPhone启动”,它会在那里停留几分钟,最后等待它启动。这是将设备连接到计算机。 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,

2 个解决方案

#1


1  

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. 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.

我不知道它是否会占用“几分钟”,但是编译完成和应用程序启动之间的时间包括将应用程序复制到设备的时间,设备验证代码签名,然后调试服务器到启动,阅读整个应用程序并开始与Xcode通信。在具有大量图像资源的大型应用程序中,执行这些操作所需的时间非常明显(读取:因为全部出局而烦人。)当简单地启动先前存在的,先前启动时,这些任务都不需要完成应用程序,没有调试器。

#2


2  

I have 2 iPhones and one of them is behaving the same as yours. The only difference is that the "slow" one has 350 or so apps installed and the fast one is almost clean. 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.

我有2部iPhone,其中一部与你的表现相同。唯一的区别是“慢”的应用程序安装了350个左右的应用程序,快速的应用程序几乎是干净的。我认为这是我的问题。你可以重置所有内容(没有安装应用程序)只是为了检查它是否能解决你的问题。

#1


1  

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. 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.

我不知道它是否会占用“几分钟”,但是编译完成和应用程序启动之间的时间包括将应用程序复制到设备的时间,设备验证代码签名,然后调试服务器到启动,阅读整个应用程序并开始与Xcode通信。在具有大量图像资源的大型应用程序中,执行这些操作所需的时间非常明显(读取:因为全部出局而烦人。)当简单地启动先前存在的,先前启动时,这些任务都不需要完成应用程序,没有调试器。

#2


2  

I have 2 iPhones and one of them is behaving the same as yours. The only difference is that the "slow" one has 350 or so apps installed and the fast one is almost clean. 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.

我有2部iPhone,其中一部与你的表现相同。唯一的区别是“慢”的应用程序安装了350个左右的应用程序,快速的应用程序几乎是干净的。我认为这是我的问题。你可以重置所有内容(没有安装应用程序)只是为了检查它是否能解决你的问题。