iosxcodeiphone-developer-program

How long will an iOS app continue to function after being installed for testing on a device?


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?


Solution

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

    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.


    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.

    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.