Xcode doesn't see my iOS device but iTunes does

124,691

Solution 1

  1. Select Window ➜ Organizer in Xcode. Now under Devices, select your device. If it is not ready for development then click use for development.

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

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

Solution 2

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:

  1. Quit Xcode
  2. Disconnect the device
  3. In a terminal window, type: sudo pkill usbmuxd (it will be restarted again automatically)
  4. Restart Xcode
  5. Connect the device

Your device should now be visible again in Xcode!

Hope that helps a few people. Apparently it does!

Solution 3

Had the same problem , restarted xcode and it found my phone again.

Solution 4

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.

Solution 5

I get this problem once, using a not official Apple cable.

Hope it helps.

Share:
124,691
Vlad
Author by

Vlad

Experienced software engineer

Updated on July 08, 2022

Comments

  • Vlad
    Vlad almost 2 years

    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?

  • Satish
    Satish about 12 years
    Here is how I solved it. It never connected in first shot. I had to retry 8-10 times and finally it connected. Once it got connected in organizer I went to devices, selected this device and under this I selected provisioning profile. Right clicked then I got the option add device to provisioning portal. Then I added giving apple id. From next time onwards I was able to connect the first time itself.
  • Vlad
    Vlad about 12 years
    I Am Ashamed. I just forget to press "Use for development" in the XCode organizer.
  • itsaboutcode
    itsaboutcode about 12 years
    @iVips - I am facing the similar problem but I am not even getting "Use for development", how to fix this?
  • Ed McLaughlin
    Ed McLaughlin over 10 years
    I finally got Xcode to recognize my iPad using the instructions above and with the same config as @Dustin -- Xcode 5.0.2, iOS 7.0.4 -- on a Macbook Air running OSX 10.9.1. It took a fair amount of trial and error, however, and it wasn't until I finally disconnected to the iPad from the USB3 port on the left side of the computer and reconnected it to the USB3 port on the right side that Xcode finally recognized it.
  • amergin
    amergin almost 10 years
    Thanks Michael - same problem. 5s working fine until xcode suddenly decided it wasn't there. Then iTunes agreed with xcode. Rebooting the phone fixed it for now. Getting worrying how many of these random bugs are getting past apple's release teams.
  • avance
    avance over 9 years
    This also worked for me. I had a situation where iTunes also wasn't recognizing the device, and plugging the device back in resulted in the "Trust this Computer?" dialog each time.
  • Erik Villegas
    Erik Villegas over 9 years
    Thank you!! This also fixed the "trust this computer" pop-up I was getting every time.
  • gaussblurinc
    gaussblurinc over 8 years
    does this issue happen with somebody (Xcode 7.2 and iOS 9.2.1 device)? ( it happens with me and this method ( variations of this answer' steps help )
  • jcaron
    jcaron over 8 years
    I actually haven't had it happen to me in a while, but it may be because I haven't done things like connecting a device while the Mac is locked. Or maybe it's because they fixed the issue.
  • Elia Weiss
    Elia Weiss over 8 years
    This work - note: it happend because I deleted the mobileprovision profile file by mistake - so I had to added to organizer first.
  • Profstyle
    Profstyle about 8 years
    perfect help ! No one ever thought about it. Congrats
  • kramer65
    kramer65 almost 8 years
    in Xcode 7.3.1 there is no "Devices" option in the Organizer anymore. Any other ideas?
  • Matt
    Matt almost 7 years
    @kramer65, it is now Window > Devices instead of Window > Organizer > Devices
  • Mephisztoe
    Mephisztoe almost 7 years
    After numerous attempts of trying to get Xcode on a virtualized Mac find my physically attached iPhone again, this tipp also worked for me: Simply rebooting the iPhone. Who said that "Did you try turning it off and on again?" only works for Windows? :) Thanks Jeremy!
  • Someone Special
    Someone Special almost 6 years
    This works for me without relaunching xcode or device
  • kit
    kit over 5 years
    If you have this alert message: "The run destination iPhone is not valid for Running the scheme 'video'." Follow this answer. It fixed the problem.
  • Finder丶Tiwk
    Finder丶Tiwk about 5 years
    nice, it saves me a lot of time
  • MrMojoRisin
    MrMojoRisin about 5 years
    The same. In my case the problem was the cable too. I do not know why, but when I plugged in the phone it was charging, and I also saw it with the ioreg -p IOUSB command, and the phone showed me the message "Do you trust this computer?" But I could not see the device in the Xcode in any way. I tried another cable and it worked.
  • Atak
    Atak over 4 years
    Tried every other solution but this is the one that workedd for me. Xcode 10.1/ iphone 6s 12.4.1
  • mylittleswift
    mylittleswift over 4 years
    worked on xcode 10.3 after upgraded to MacOS 10.15.1!
  • Ratheesh
    Ratheesh about 4 years
    For virtualbox Mac Catalina also it worked. Thanks mate.
  • Trinh Tran
    Trinh Tran almost 4 years
    Same my case, its was cable issue.
  • Dani
    Dani almost 4 years
    My phone was plugged into an outlet, not the computer.
  • valeriana
    valeriana almost 4 years
    this, plus clear derived data and clean build works for me
  • Pascale Beaulac
    Pascale Beaulac over 3 years
    Also check the USB cable... XD just happed to me, lost 1 hrs trying to find why Xcode did not see my iPhone any more!!
  • Roman Bobelyuk
    Roman Bobelyuk over 3 years
    You saved my life before release
  • Mihir
    Mihir over 3 years
    Thank you, so much, @jcaron! This worked for me. was just about to start pulling my hair :)
  • Mandeep Singh
    Mandeep Singh over 3 years
    Thanks bro, I thought I have to purchase a new one.
  • Boris Verkhovskiy
    Boris Verkhovskiy about 3 years
    @kramer65 turning it off and on again worked for me.
  • Krutika Sonawala
    Krutika Sonawala almost 3 years
    this helped. yay!
  • MischkaTheBear
    MischkaTheBear over 2 years
    I had been running Xcode with Rosetta on my MacBook Pro M1 and that created provisioning profile issues ala link. Once I opened Xcode normally without using Rosetta, I did the above steps, voila it worked! I spent 2 days on this issues. Thanks!!!! Note: turning off Do Not Disturb and Personal focus was also necessary. Hope that helps someone.
  • udi
    udi about 2 years
    same issue happend in xcode 13 and this worked