Xcode can't build to physical iPad - ios

I have been able to build my projects to my iPad air as recently as last week, however, after I tried to turn on connect via network it seems that either the iPad or Xcode has entered a corrupted state.
When connected to Xcode -> window -> devices and simulators
This message <device name> is busy: Preparing debugger support for <device name> will never go away.
When trying to build the project while usb cable is attached:
But it will never finish...
Xcode Version: 10.2.1 (10E1001)
iPad air model: MD788KN/A
iPad Software version: 12.3.1
I have tried rebooting the iPad without any change in behavior, I have also tried to reset all settings Settings -> General -> Reset -> Reset All Settings still no change in behavior.
I have an iPhone 5, another iPad air + an iPad pro frequently connected to my machine with this instance of Xcode. Neither of these devices have any troubles connection or building.
EDIT: and btw, tried the solution from here: Xcode 9 "iPhone is busy: Preparing debugger support for iPhone"
this have been going on for a few days now. waiting 10-15 more minutes will not help.
Some times after rebooting iPad and restarting Xcode I will get past the "waiting for debugger" but instead I will see this error
Even though I have unlocked the device... iTunes even acknowledge it as unlocked and are able to look into the device. Xcode on the other hand still believes that is is locked.

Related

Xcode 13.2.1 won't recognize iOS devices on MacBook Pro M1

I have an App on the app store that works fine. Last January ('21) I bought a Macbook Pro M1 (now running Monterey 12.1) and have shifted all my Xcode files to it. Everything builds fine when I have "Any iOS Device (arm64)" selected, or any of the device simulators, but not when I have my MacBook Pro selected as the device to run the app on, nor in either of the two iPhones I can connect via USB. I've been trying for 2 days to get either one of my iPhones (8 plus and 6s, both running iOS 15.2.1) to be recognized by Xcode (13.2.1) and show up in the Device list without any luck. They show up in Apple ID, in Apple Music when plugged in via USB, and pretty much everywhere else, just not in Xcode.
I've tried everything on this SO thread to no avail: Xcode doesn't see my iOS device but iTunes does
I've tried "automatically manage signing", and done it manually. I've unplugged, updated, and restarted in multiple different configurations. I've tried all different types of provisioning profiles. All software versions match each other on all devices and are up to date.
Anyone else experiencing this? I'm totally stumped.

Xcode 9.2 says my "iPhone has recently restarted" and won't run

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?
Unpair the device and pair it again from xcode -> Window -> Devices will solve this issue.
Posted as answer after the confirmation from #brettf.
if you using vpn services, then you need to turn off vpn. It will help
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.
VPN calls this issue on my iPhone for Xcode 14.0.1
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
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.

iPhone with iOS 10 not detected by xcode 8 beta or itunes

I upgraded an iPhone 5 to iOS10.
When plugged in, it is not detected by neither xcode (organizer and whatnot) nor itunes.
Known facts :
pluging the device to my mac makes the device battery charge. However the popup "trust this computer ?" does not show
I have xcode 8-beta installed
What I've tried so far :
tried with another cable
tried on other mac
same cable but another iPhone (ios9.x) : detected as wanted (itunes & xcode)
reset main settings
reboot the ihpone in recovery mode : still nothing
Another side-problem is that I can't downgrade to iOS9. If I understand correctly the procedure, one has to plug the device to iTunes in order to downgrade to iOS 9.
I think the problem is this device, prior to upgrading to iOS10, was not registered neither in iTunes nor xcode. Maybe that's the problem ... not sure :( And no idea what to do next.

Unable to profile app on device with iOS 9.0.1 using Xcode 7, 7.0.1 or 7.1 beta

I have been trying unsuccessfully to profile my device (via Instruments) using the latest version of Xcode 7.0.1 (7A1001 released 9/28), as well as the previous version of Xcode 7 (7A218), as well as Xcode 7.1 Beta 2 (7B75).
My device is an iPhone 6+ with iOS 9.0.1 installed - the latest GM release of iOS9. I am able to run / debug applications on this device without issues.
In the screenshots below you can see that my device is disabled (greyed out) in all screenshots in all versions. I am able to profile other devices running iOS 8.4.1 without any issues.
Does the current version of Xcode not support profiling against iOS 9.0.1 or is there some kind of configuration setting or known work around for this?
Xcode 7.0.1:
Xcode 7.0:
Xcode 7.1 beta 2:
TL;DR - Perform a complete reboot of your device; restart Xcode & instruments; select "Open Xcode" if prompted to enable the device for development.
Update 3/31/2016: I haven't encountered any issues with the latest version(s) of Xcode (7.2.x, 7.3), so it seems that the stability here has been improved.
I believe I may have finally gotten this to work properly. Detailed steps:
Unplug the device from your Mac & power down the device completely (hold the power button for several seconds; slide to power off).
Close Xcode and Instruments.
Restart the device & once it has booted completely re-connect it to your Mac.
Re-launch Xcode. Here, my device showed as disabled and Xcode indicated that the device was not available for use.
Open your project; clean (Shift+Command+K), Build (Command+B), Profile (Command+I).
After Instruments launched I noticed that the device was enabled. Upon selecting it, a message was displayed with the title "Enable this device for development?" and message "This will open Xcode and enable this device for development." (Note that this only happened to me the first time I went through this process even though I had already been using the device for development - whereas some users have also reported that they are not presented with this dialogue.)
Click "Open Xcode". Here Xcode did not prompt me for anything nor was anything displayed - no additional messages indicating anything had been done or that the device was or was not available for development. Opening the Devices window, the device appeared to be available. (I have not been presented with this option for subsequent occurrences.)
Now I was able to select the device in Instruments and profile it.
As a side note, I was also again able to delete installed apps from the Devices window (I realized that this was not possible to do previously).
I'm unsure how my device ended up in this state however I will be on the lookout to see if this continues to occur.
Please note that this was done using Xcode 7.0.1.
Update: My device seems to lapse back into not being able to be used for profiling some time after performing these steps - I've had to reboot my device again in order for it to be available for profiling. Not sure what is triggering this behavior but I will file a Radar for this.
Close instruments -> reset your device by long pressing home and power button -> restart instruments. Works for Xcode 7.3.
According to Apple staff on the developer forums the behaviour of this issue is greatly improved in the Xcode 7.3 betas, so one easy solution is to try upgrading Xcode. I've upgraded and it seems to be behaving so far.
This issue still occurred with XCode 10.3 and iOS 12.4.2
I restarted the device only, and it worked.

Xcode Server 4 not seeing any new attached devices

Xcode Server running on a Mac mini can no longer see any iDevices attached to it. Initially was able to see an iPhone 4, but no other devices since. Anyone have any suggestions?
Additional info:
Test Bot is configured to run all Simulators and devices
Test Bot runs in Xcode 6 and completes tests against Simulators but not any devices
iPhone Configuration Utility shows attached iDevices as expected
Xcode 6 on the server (mac mini) can see the attached iDevices
iDevices have the correct provisioning profiles
(possibly related) Server's app icon in the dock has a no go/ stop icon overlaid on it:
For anyone else encountering this issue: my solution was to just delete the XCode server application and reinstall.

Resources