Keep iphone unlocked when building it in xcode

Viewed 892

When I use the build button in xcode to run my cordova app on the phone, if the build process take too long I get a "Device locked" error.

Is there a way or any hack I can do to keep my iphone unlocked when it's building? Is there a way to tell xcode to keep my phone unlocked?

2 Answers

The easiest fix for this is to disable sleep mode (for up until ~1hr) for your phone. Then you won't have to worry about it locking.

  1. Open the Settings app.
  2. Tap Display & Brightness.
  3. Tap Auto-Lock.
  4. If this option is grayed out, visit this Lock screen settings tip to learn what to do. Set the lock feature to a time that works for you.

To fiddle with the phone's auto lock duration whenever you're working, and then changing it back to normal is not ideal for me since I use my primary phone for testing apps too. My workaround was to run a youtube video on silent and let iOS switch it to my testing app whenever the build is ready!

Related