Xcode Will Continue When Iphone is Unlocked
I am making an app in Xcode 9.2 and trying to run it on my iPhone (5S running iOS 11.2.1), Xcode compiles the application fine (I can run it in the simulator) but it does not run on my iPhone.
When I try to run it on my iPhone it just says "iPhone has recently restarted" and "Xcode will continue when iPhone is unlocked." Now, my phone has not recently restarted and I tried unlocking the phone and restarting it but neither works. I also tried restarting Xcode.
Is anyone else getting this "recently restarted" error? Is there anything I can do about it?
asked Dec 27, 2017 at 1:25
brettfaziobrettfazio
1,026 10 silver badges 25 bronze badges
4
6 Answers 6
Unpair the device and pair it again from xcode -> Window -> Devices will solve this issue.
Posted as answer after the confirmation from @brettf.
answered Dec 27, 2017 at 16:21
RJV KumarRJV Kumar
2,363 1 gold badge 18 silver badges 28 bronze badges
6
-
This works also for iOS 11.2.5 on Xcode 9.2, but you must disconnect the cable first. Otherwise Xcode will just crash.
Jan 30, 2018 at 16:54
-
This works also for iOS 11.2.6 on Xcode 9.2, but you must disconnect the cable first. Otherwise Xcode will just crash.
Feb 27, 2018 at 7:01
-
What if it's connected through Wifi? I've unpaired and now I need a cable to pair again.
Jun 17, 2018 at 21:56
-
@CanPoyrazoğlu had the same situation, in Xcode -> Window -> Devices disabled 'Connect via network' option and it also solved the issue
Jul 30, 2018 at 8:10
-
@DimaCheverda so if I disable it there, can I enable it again without plugging it with a USB cable first?
Jul 30, 2018 at 20:16
if you using vpn services, then you need to turn off vpn. It will help
answered Jun 30 at 12:34
2
-
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
Jul 8 at 0:40
-
Worked for me! Simply turned off my vpn and everything began to work again!
Aug 17 at 12:44
If you're using a VPN on your iPhone that may be causing the problem - at least it was for me. Things went back to normal once I turned off my iPhone VPN.
I didn't have a problem while a VPN was enabled on my Mac, but it may be worth turning that off as well if you still have issues when the iOS device VPN is turned off and the device still won't connect correctly.
answered Sep 21 at 4:44
Trev14Trev14
3,252 2 gold badges 28 silver badges 36 bronze badges
2
-
Thanks, that was the problem on my device as well.
Sep 24 at 9:33
-
the answer duplicates the answer above
Oct 4 at 16:09
Just to clarify:
-
Unplug device
-
In Xcode, windows -> devices and simulators
-
Right-click the device shown in the left pane. Select 'Unpair device'
-
Plug in device
-
Follow the prompts on the iPhone and Mac
Stephen Rauch♦
45.8k 30 gold badges 105 silver badges 126 bronze badges
answered Aug 10, 2018 at 2:48
I just encountered this problem for Xcode 12(both release and beta version), the unpair and repair
solution does not resolve, so I reset all settings(Settings
-> General
-> Reset
-> Reset All Settings
), and then the problem solved.
answered Apr 16, 2021 at 8:01
tomisacattomisacat
467 4 silver badges 10 bronze badges
VPN calls this issue on my iPhone for Xcode 14.0.1
answered Sep 28 at 8:25
1
-
the answer duplicates the answer above
Oct 4 at 16:10
Source: https://stackoverflow.com/questions/47985316/xcode-9-2-says-my-iphone-has-recently-restarted-and-wont-run
A generic final solution is to reboot the computer, have you tried it?
Dec 27, 2017 at 1:32
@YunCHEN Yes, I tried a reboot of: the computer, the iPhone, and Xcode. None of the reboots have seemed to do anything.
Dec 27, 2017 at 1:34
Unpair your device and try again.
Dec 27, 2017 at 6:57
@RJVKumar This was successful. I can mark it as a correct answer if you post it as such.
Dec 27, 2017 at 15:53