Reputation: 2160
I have a strange problem.
I have an iPad with iOS 5.0.1 (9A405) and iOS SDK 5.0.1 with Xcode 4.2 (Build 4C199) installed on my Mac.
Xcode doesn't see my device. It says "iOS Device" not "Sauron's iPad" as usual.
(I am sure that device is connected because I see it in iTunes.)
Xcode denies to start my application on device.
It says:
"Xcode cannot run using selected device. No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination."
Xcode sees my other iPad with iOS 4.3.3 and can run applications on this device. I have tried to restart my Mac - without result.
I also checked provisioning profile, developer certificate, etc.
Does anybody have ideas?
Upvotes: 149
Views: 149515
Reputation: 728
Like many others I have tried all the options.
For me it resolved it to restart the Mac and iPhone while bluetooth was disabled on the iPhone. Will probably never know if this was the cause or it just helped restarting both for the 3rd time.
Bonusinfo, mine worked perfectly with an iOS 16 phone and my phone was iOS 17. This narrowed it down to being the phones fault and not the Mac.
Upvotes: 0
Reputation: 5806
Another one for this never ending pandora of single symptom multiple causes In Xcode 15.0 the device run targets were unavailable until after iOS 17 simulator will have completed downloading (for which you need a LOT more space than 7.6GB declared).
Upvotes: 0
Reputation: 640
If you're this far down the answers:
Connecting my laptop to my company's VPN causes my USB-connected iPad to not be recognized in Xcode 15.0.
I know it sounds unbelievable. But try making sure both devices have an identical network configuration.
Upvotes: 10
Reputation: 134
In my case It was my USB port. I am using Macbook air M1. First USB-C port is connected but the second one only did charging.
Upvotes: 1
Reputation: 1679
I'm facing same issue in XCode 14.2(14C18)
. In my case I've tried all the following steps, Deleted Derived Data, Cleaned project build folder, even Restarted XCode didn't worked. Tried below steps and device is visible again
sudo pkill usbmuxd
Upvotes: 1
Reputation: 1305
I followed all the steps above and the device was no longer visible in Xcode. The device was visible on my mac (on each new connection attempt). I have disconnected the device several times. The solution which worked after 15 minutes was to connect the device with a braided (original) iPhone cable, rather than an older regular (original) cable. I guess Apple is telling me to buy new cables...
Upvotes: 0
Reputation: 17710
Even though this one does not address the specific problem of the OP, it might be a solution for other people finding this question.
In some circumstances, Xcode will not recognise (won't even see) a connected device that was previously recognised, even though there were no changes in Mac OS/iOS/Xcode versions. This seems to happen if you connect the device while the Mac and/or the device are locked when you connect them. The device will ask if you want to trust the computer even though you already did so, but the device will still not be visible in Xcode.
Restarting Xcode or the device do not seem to have any effect. One solution is to reboot the Mac. Another much quicker solution is to restart usbmuxd
:
sudo pkill usbmuxd
(it will be restarted again automatically)Your device should now be visible again in Xcode!
Upvotes: 325
Reputation: 2235
This is absolutely bizarre! Xcode has been working fine with my iPhone for weeks, and today it stopped working. None of the tips above worked.
Finally I switched the cable from the left hand side port to the right hand side port, and now Xcode is recognizing my phone! PHEW!
But only on that specific port. Going back to the left hand side port still doesn't work!?!?!
Upvotes: 0
Reputation: 1121
I tried all the ways here but still didn't work. I plugged the cable that I connected the phone to the computer instead of another socket and it worked.
Upvotes: 1
Reputation: 1155
The problem was solved for me when I used an original cable. You also get an original cable.
Upvotes: 1
Reputation: 1775
Here is how I figured out the problem. Go to Xcode -> Window -> Device and Simulators -> Devices. There you could see Errors and Warnings. I found that my Xcode has to be updated because IOS version of my device is higher.
Upvotes: 3
Reputation: 155
If none of these work, try simpling restarting your iphone or device! Works every time for me (:
Upvotes: 4
Reputation: 2093
Xcode 10.2.1 was not recognizing my ipad mini. I unplugged and rebooted the mini and it became visible.
Upvotes: 0
Reputation: 114
My app worked on all simulators but not on my device. I tried just about all the steps from each comment and didn't have any luck. I went to my device settings and switched my "Personal Hotspot" from off to on. Then it was all good!
Upvotes: 2
Reputation: 226
Ran into this issue having upgraded from XCode 9 to 10.1. No devices at all were appearing in XCode, despite performing all the steps listed in other answers.
For me the solution was to do a clean CMake build, deleting the old Xcode project files.
Upvotes: 0
Reputation: 1173
When you trying to build and run the current scheme but encounter this alert message:
"The run destination iPhone is not valid for Running the scheme."
Plus you already check your phone and it is connect to your Mac properly, all you need to do is just simply restart your Xcode and build it again. That will do the job.
Upvotes: 0
Reputation: 329
The error I had in XCode was "iOS version lower than deployment target", which I didn't know how to fix. The error was displayed where the iPhone should have been indicated as a Device (upper left). I selected the project in Project Navigator and noticed that the iOS Deployment Target was set to 11.3 but when I checked my iPhone it was set to 11.2.1 (or something lower than 11.3). So I opened Settings on the phone, scrolled down to General and tapped Software Update. Since the update said it was scheduled but didn't start, I decided to take the SIM card out of my other phone and put it in the iPhone I was using for testing. Then the upgrade started quickly. After the Update finished on the phone, however, XCode still didn't recognize the phone. I unplugged the USB cable but didn't hear any sound, so I plugged it into another USB port on the computer and then heard a sound. Then XCode noticed the phone. So the problems were that the iPhone didn't inform me that I had an Update (or I ignored it and forgot about it) and it may have needed the SIM card, and I had a bad USB connection.
Upvotes: 1
Reputation: 997
After 20 minutes of debugging, I realized I had to hover over the up button (🔼) at the top of the Devices
picker in the top left hand corner, to the right of the run app button 😂
Upvotes: 1
Reputation: 2204
In my case I did next steps
sudo launchctl stop com.apple.usbmuxd
Upvotes: 11
Reputation: 7238
After updating my iPhone to 10.3.3
, Xcode 8.3.3
cannot find it in the Device
window but iTunes can. Restarting Xcode fixed the problem.
Upvotes: 1
Reputation: 1485
Select Window ➜ Organizer in Xcode. Now under Devices, select your device. If it is not ready for development then click use for development.
If above doesn't solve your problem then from your project settings, set deployment target to one which your app is developed for or lesser.
Otherwise there is some issue with certificates and provisioning profiles. Make sure your device's UDID is added in the provisioning profile you are using.
Upvotes: 86
Reputation: 1109
I ran into this issue today where Xcode 8.2.1 suddenly decided the connected ipad (ios 10.2) was no longer connected. Unplugged, plugged back in, rebooted my macbook, and tried numerous recommendations above. The thing that fixed the issue for me was shutting down and rebooting the ipad device itself.
Upvotes: 18
Reputation: 103
For Xcode 7
(and possibly above),
go to Window -> Devices,
hit the plus sign
at the bottom and select the device
connected and hit next
, then Use for development
.
This only works if Xcode
is reading your device, but you aren't able to run your app on the device.
Also make sure the device's OS version is greater than or equal to your app's
Deployment Target
OS version.
Upvotes: 4
Reputation: 1655
May be my answer is helpful to new developer. Just follow these step , You can connect your iPhone/iPad with X-code.
Upvotes: 7
Reputation: 1210
Had same problem with some non-licensed cables. Works fine with Apple's & Belkin's USB cables.
Upvotes: 2
Reputation: 231
Xcode 6.3 didn't see my iPhone running iOS 8.3 even after a computer restart. I then restarted my iPhone and everything worked again. Love buggy software!
Upvotes: 0
Reputation: 9299
I get this problem once, using a not official Apple cable.
Hope it helps.
Upvotes: 21
Reputation: 317
Just unplug the cable of iPhone with your mac and then plug cable in mac work for me.I hope it's work for someone.
Upvotes: 0
Reputation: 3018
Xcode did not see my iPad, iTunes also did not see my device. Rebooting Mac corrected the situation.
Upvotes: 3