iOS 应用程序在安装到设备上进行测试后还能继续运行多久? [英] How long will an iOS app continue to function after being installed for testing on a device?

查看:34
本文介绍了iOS 应用程序在安装到设备上进行测试后还能继续运行多久?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Xcode 在设备上安装 iOS 应用程序后,为了在设备上进行测试,在设备断开连接后应用程序还能继续运行多久?

After installing an iOS application to a device using Xcode, for testing on the device, how long will the app continue to function after the device is disconnected?

推荐答案

从个人测试来看,如果我在 Xcode 中使用 Run 命令部署应用程序,然后拔掉 USB 电缆,通常这会终止设备上的应用程序几秒钟.这是因为您已在调试模式下运行应用程序.在调试模式下,应用程序连接到 Xcode 中的调试器;调试模式将日志语句输出到连接的调试器.这还将应用程序的执行与调试器联系起来(因此它可以捕获致命的异常和其他事情).如果拔掉电缆,应用程序将因无法与 Xcode 通信而很快终止.

From personal testing, if I deploy the application using the Run command in Xcode, and then remove the USB cable, generally this terminates the application on the device within a few seconds. This is because you've run the application in debug mode. In debug mode, the application's connected to your debugger in Xcode; debug mode outputs log statements to the connected debugger. This also ties the execution of the application to the debugger (so it can catch fatal exceptions and other things). If you unplug the cable, the application will terminate very quickly as a result of being unable to communicate with Xcode.

如果您部署应用程序,但在所有构建阶段完成后(以及在应用程序运行之前或什至之后)点击停止,您应该能够独立于 Xcode 使用该应用程序,它将作为只要设备有电,并且您用来部署它的配置文件没有过期.

If you deploy the application, but then hit Stop after all of the build phases have completed (and before or even after the application runs), you should be able to use the application separately from Xcode, and it will work for as long as the device has power, and the provisioning profile you used to deploy it has not expired.

如果您要部署测试版本,您可能会使用开发配置文件(而不是分发).自您在 iOS 配置门户上生成它们之时起的最后 十二个月.

If you're deploying a test version, you're likely using a Development Provisioning Profile (as opposed to Distribution). These last twelve months from the time you generate them on the iOS Provisioning Portal.

分发配置文件的持续时间较短.我目前在 9 月到期,我相信我是在去年 12 月生成的,所以大约 9 个月.

Distribution provisioning profiles last a shorter amount of time. One I currently have expires in September, and I believe I generated it in December last year, so that's about 9 months.

这篇关于iOS 应用程序在安装到设备上进行测试后还能继续运行多久?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆