My iOS device not appearing in xcode device list, showing in organizer - ios

I m having xcode 4.5,
I have connected my iTouch(registered in developer program) to Mac Machine. It is appearing in Organizer's Device list. But, it is not appearing in xcode's device list(where simulators are) in one of my project. It is also shown when i open my other proejects.
So, What may be the problem in my this project, in which device is not appearing. Is any settings should be changed??

See the image below and change the settings.

You might need to "trust" the computer - a device will not show up in the organizer if the computer is not trusted.
Restart the iPad while it is connected to the computer. When it restarts, it will ask if you want to "Trust" the computer or not. Do so, then the device will show up in the Xcode Organizer.

Restart XCode
Try Changing the USB Port.
Clean Project. Shift + command + K.
Clear Derive Data.

I tried everything and then found that my device was identified on a different Mac but not mine. Quit and Reopen XCode resolved it.

The deployment target for your project is probably too high (e.g. iOS 7 if you are using Xcode 5 DP). Change it to a minimum version compatible with your device and try again.

Go to organiser, select your device, click on remove button at bottom of organiser screen, unplug your device and connect it once again. That's it. your device should be appear in xcode.

Go to organiser and click your device in the left panel. On the right, see if it is registered for development or not. If not, click "Use for development".
Hope it helps !!

Got this problem too. I plug my phone to Apple Cinema Display. Turns out I forgot to plug in the display's USB cable to my MacBook Air, so only power goes to my device but no data transmission (/me facepalm big time).

My case, I was trying to run a sample app I just downloaded and didn't knew it was iPad only. And I had plugged-in an iPhone. :)

I’m using a MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports) and my iPhone was connected through a USB-C Digital AV Multiport Adapter. The iPhone was no longer shown as a connected device. Tried connecting the iPhone directly to the MacBook without the Adapter and now it IS a connected device. I’m going to consider using a wireless connection for development.

Related

iPhone not connected. Xcode will continue when iPhone is connected

I have my iPhone connected to Xcode. It used to work just fine recently. I see it in the Devices and Simulators section, but when I try to compile my app, it says:
D's iPhone 6S is not connected. Xcode will continue when D's iPhone 6S is connected.
In the Devices and Simulators I see it as disconnected.
I tried restarting the phone, turning it's wifi on and off. It's connected to the same wifi network, I tried restarting Xcode, nothing. I run Xcode 9, Beta 6 at the moment. Does anyone has similar issue and hopefully know how to solve it?
Troubleshooting:
plug in your iPhone.
Open Xcode
go to window -> Devices and Simulators
Right click on your device
click Unpair Device and unplug it.
restart Xcode
restart your iPhone.
Connect your iPhone via USB
run your app
then unplug it, and it should run via the wifi again.
Set up
Window -> Devices and Simulators
Choose your device from the list.
Tick the box for "connect via network."
In Window > Devices and Simulators, right click on your iPhone and "Connect with IP address", then enter the iPhone IP address and you're connected.
Turn off WIFI on Mac, and also on your iPhone too. Then turn on WIFI again on both devices.
I frequently face this issue since I don't use USB cable to build the app to my iPhone. So this is my usual way to resolve the connection problem.
As Sam H.'s answer, can Connect via IP Address. This is XCode 9 or 9.1 's function. And need your device update to iOS11 +
Apparently, more people have this issue. The only "solution" I found was to connect the iphone with a USB, run the app and then try to run it using wifi. This usually solves my problem.
You can also connect via IP address
While Xcode is open, go to
Windows -> Device and Simulators
right click your device and connect via IP address. You can get your phone IP address from settings under wifi and clicking the info button on the network.
Restarting the wifi on my Mac worked for me.
I'm using Xcode 9.1 and suddenly had this issue.After reading other answers a realized it is a Xcode bug via wifi debug.My solution was to connect the iphone with a USB, then go to the Add Additional Simulators,then come to the interface below,uncheck "connect via network".
Problem sovled,and back to debug via a USB.
I was able to reconnect using this method:
Disconnect/Unplugged the device from Mac
Close X-Code
Run "sudo pkill usbmuxd" in terminal
Reopen Xcode
Reconnect Device
Try this if unpairing method does not work.
Making Cellular data Off solved my problem
I had to update Xcode in my case. I tried literally everything else in this thread.
I had this issue when I changed my network connection on my Mac and in this case reconnecting the phone with an USB cable doesn't work. I had to restart xCode.
I had to reopen Xcode with my iPhone X unlocked and then I had to open Windows->Devices immediately afterwards.
Then the message was changed into:"iPhone X is busy: Preparing debugger support for iPhone X"
Also make sure your iOS device is on the same wifi network as your Mac, otherwise Xcode will insist you connect your device via USB, even if you've checked the box to use wireless development for that device.
There could be more than one reason why xcode forgets the device often. One of them could be the dynamic IP which is assigned automatically.
Apart from general troubleshooting (device is unlocked etc), here are few suggestions based on my experience.
1) Check if you are using the SAME WIFI on computer and device.
2) In Xcode > Devices and Simulators > Right Click > Unpair Device and connect again.
3) Prefer to use static IP. At least for the device (Give Manual IP address in the iPhone).
4) In Xcode > Devices and Simulators > Connect via IP Address
5) Use USB cable to run the app and then unplug to use wireless solves it most often.
6) Disconnect and Reconnect Wireless on Computer & Mobile Device
7) Turn off the Cellular Data
8) Turn off any VPN you are using.
9) Check your Network Settings on Computer and Device. Disable any suspecious setting (Proxy etc).
10) Restart Device and Computer. It often resolves few network interface problems.
Make sure your Mac and device connected in same network(Wi-Fi) connection.
In my case a pending software update on my iPhone was preventing it from accepting new builds from Xcode - even over USB.
I tried all the other suggestions in this thread and nothing worked, but accepting the pending update on my phone fixed the problem.
This is just to add the other possible reasons that the answers forgot to mention:
You got a new phone and Xcode is trying to connect to the old phone:
Window<< Devices and Simulators:
Press the + button and connect your phone via usb cable and click
your on your device. It should add it at that point.
You could also try running bluetooth instead of wifi, but it might still do the same problems. Make sure your device is connected correctly
1 - Go to Xcode - Window - Device and simulator - Unpair device
2 - Xcode and Mac both are restart and open Xcode again and connect your device Via USB cable and run it.
Restart Xcode & if issue persists do steps 2-4.
Open Devices and Simulators window in Xcode (shortcut is ⌘⇧2 command+shift+2)
Make sure your device is active (press home button & enter passcode if needed)
Open terminal & run netstat command.
You device will be reconnected
Just in case someone did what I did: I used to have wireless connection with my mac mini but one day I decided to use a cable. From that day I had problems with my devices, I always had to use usb the first time I opened Xcode. When I removed cable connection everything worked fine as before.
I tried a combination of the above solutions and can't pinpoint what solved it.
When Xcode was stuck on trying to connect to my wireless iPad, I had to do was start browsing with Safari on my iPad. I think that somehow refreshes the network on the iPad.
The Xcode's 'Device and simulator' may not properly reflect the connection status between the device and mac so after browsing with your iPad/iPhone hit run on Xcode and then just wait till they find each other
I had the same problem yesterday/today. Tried the various suggestions here but none worked. Except maybe, restarting the iPhone. I was able to install my app!!
Previously I had a Xcode/iOS version mismatch but currently at 12.2/14.2 which should and finally did work.
My problem was actually the cable itself, seems that some of the cheap cable you buy might not work 100% with your ipad/iphone. Try with a different cable
You must put a passcode on the device, otherwise wifi debugging will not work.
Unlock your iPhone or iPad (helped me).
Apparently the Apple engineers don't really have networking under control.
Typically, a dance of (in the order of increasing inconvenience)
Toggling "Connect via Network"
Toggling "WiFi" on Mac and iPhone
Unpairing + Repairing the device in the Xcode organizer
Restarting (yes, just like Windows) the Mac and the iPhone
works for me.

how to wireless debug in ipad mini 2? [duplicate]

Wireless debugging was recently added as a feature in Xcode 9, iOS 11, and tvOS 11. Apple TV 4K doesn't have a USB port, so it requires wireless debugging. How do you perform this wireless debugging in Xcode?
Set up a device for network debugging
from help.apple.com
Debug your app running on an iOS or tvOS device over a Wi-Fi or other network connection.
Steps to set up iPhone, iPad, or iPod touch
Check that your device has a passcode and add one if it doesn't. Your device must have a passcode to enable remote debugging
The Mac and the iPhone/iPad need to be on the same network to use wireless debugging.
Next, in Xcode
Choose Window > Devices and Simulators, then in the window that appears, click Devices.
Connect your device to your Mac with a Lightning cable.
In the left column, select the device, and in the detail area, select Connect via network.
Xcode pairs with your device. If Xcode can connect with the device using a network, a network icon appears next to the device in the left column.
Disconnect your device.
Now you are ready for debugging over the network.
Sometimes it doesn't work. You might need to restart the device or network connection.
Note: Network debugging requires Xcode 9.0 or later running on macOS 10.12.4 or later, and on the device, requires iOS 11.0 or later, or tvOS 11.0 or later.
Steps to set up Apple TV:
Make sure your Mac and your Apple TV are on the same network.
Choose Window > Devices and Simulators, then in the window that appears, click Devices.
On your Apple TV, open the Settings app and choose Remotes and Devices > Remote App and Devices.
The Apple TV searches for possible devices including the Mac. (If you have any firewall or Internet security, disable/turn it off to allow searching.)
On your Mac, select the Apple TV in the Devices pane. The pane for the Apple TV is displayed and shows the current status of the connection request.
Enter the verification code displayed on your AppleTV into the Device window pane for the device and click Connect.
Xcode sets up the Apple TV for wireless debugging and pairs with the device.
I have tried using Xcode Devices window's Connect via network options. but I am unable to see the "Connected over the network" icon next to the device name. also as soon as remove the USB the "Connect via network" option disappeared. also, the device name appears under the disconnected device list.
But using the "Connect via IP Address..." option, I am able to connect.
Right-click on the device name(Under Disconnected list) and choose "Connect via IP Address...." option.
Type the IP address of the device and chose Connect. (you can find through mobile device Settings > Wi-Fi > Choose the wifi name)
If you have completed all steps given by Surjeet and still not getting network connection icon then follow below steps:
Unpair Device using right click on the device from the Connected section.
Reconnect the device.
Click on "+" button from the end of the lefthand side of the popup.
Select the device and click on next button
Click on Trust and passcode(if available) from the device.
Click on Done button.
Now, click on connect via network.
Now you can see the network connection icon after the device name. Enjoy!
Prerequisite
Your Mac Machine should have at least Mac OSX 10.12.4 or later
Your iOS device should have at least iOS 11.0 or later
Both devices should be on same network.
Steps to Activate
Plug your iOS device with Mac machine from cable.
Open Xcode then from top menu Window -> Devices and Simulators
Chose Devices segment and chose your desired Device from left device list.
On right side you can see open Connect via network, enable this option as shown in attached image.
After few seconds you can see network sign in front of you device.
Unplug your device and use debugging as you're using normally.
Thanks
If after following the steps as described by Surjeet you still can't connect, try turning your computer's Wi-Fi off and on again. This worked for me.
Also, be sure to trust the developer certificate on the iOS device (Settings - General - Profiles & Device Management - Developer App).
Network debugging requires Xcode 9.0 or later running on macOS 10.12.4
or later, and on the device, requires iOS 11.0 or later, or tvOS 11.0
or later.
iPhone
iOS 11 won't be available for 32bit devices, i.e. iPhone 5 and iPhone 5c and below. The first 64bit iPhone is 5s.
iPad
iPad mini 2 will be the oldest iPad with iOS 11 support.
iPod
iPod needs to be an iPod 6 to be able to run iOS.
If you use your devices not only for developing but also for production, be warned that a beta OS is not for the faint hearted ;-)
In the new Xcode9-beta, we can use wireless debugging as said by Apple:
Cut the Cord
Choose any of your iOS or tvOS devices on the local network to install, run, and debug your apps – without a USB cord plugged into your Mac. Simply click the ‘Connect via Network’ checkbox the first time you use a new iOS device, and that device will be available over the network from that point forward. Wireless development also works in other apps, including Instruments, Accessibility Inspector, Quicktime Player, and Console.
Try this!
If facing disconnection issues, try this:
Workaround: Enable airplane mode on your device for 10 seconds and then disable airplane mode to re-establish your connection
I just talked to some Xcode engineers at WWDC and the auto discovery of iDevices is still a little buggy. Also sometimes your phone is not correctly broadcasting. Switching your device on and off can help.
There are a few workarounds/fallbacks:
You can check if your phone is broadcasting with Bonjour Browser (www.tildesoft.com). Look if your wifi address is listed under the service called '_apple-mobdev2._tcp. - 215' (you can find your wifi address here: settings > general > about > wifi address.
As a fallback you can connect to your device by manually entering the IP address (right click on your devices in the Devices window).
However this IP address will be persisted, so if you change networks you'll need to reset this. That option is not available in Xcode yet, but you can do it via the terminal with the following command:
defaults read com.apple.dt.Xcode | grep IDEIDS
This will print an identifier which you need to use in the next command:
defaults delete com.apple.dt.Xcode <identifier>
Now the ip address is cleared and you can enter a new one.
The last option is to create a computer-to-computer network. This works fine, but logically you won't have internet access then.
Try this:
Plug your iOS device into your Mac using a lightning cable. You may need to select to Trust This Computer on your device.
Open Xcode and go to Window > Devices and Simulators.
Select your device and then select the Connect via network checkbox to pair your device.
Run your project after removing your Lighting cable.
You can open Xcode Help -> Run and debug -> Network debugging for more info. Hope it helps.
i followed all the suggested steps, in particular the ones provided from ios_dev but my iPhone was not recognized from Xcode and i was not able to debug over WiFi. Right click on the left panel over my iDevice in "Devices and Simulators" window, then "Connect via IP Address...", inserted the iPhone IP and now it correctly works
For wireless debugging, Mac system and iPhone/Device should be on same network.
For making on same network you can do as -
Either you can start hotspot on Mac & connect that on iPhone/Device or vice versa.
On Mac
OR
On iPhone-
Xcode ► Window ► Devices and Simulators ► select devices Tab ► click connect
via network
https://help.apple.com/xcode/mac/9.0/index.html?localePath=en.lproj#/devbc48d1bad
My problem was about network SSID broadcasting.
I've tried all the solutions above but still couldn't connect my device, there was no 'globe' icon for my device at all. Then I found that for some reason my network had turned its SSID broadcasting off(tho I could still connect the network by inputing the SSID manually). Once I turned the SSID broadcasting on, I could connect my device via 'Connect via IP Address...'.
I tried all answers but nothing worked for me. I ended up connecting to different WiFi network then I was able to debug wirelessly.
I have no clue why it didn't work with the old network
The only thing that worked for me was to connect my phone to my MacBook using Bluetooth. (I did this after first pairing my phone with Xcode while connected via cable per ios_dev's answer above.)
On my phone, I went to Settings > Bluetooth and tapped my MacBook's name under "MY DEVICES" to connect.
I then went to Xcode > Devices and Simulators, selected my phone and checked "Connect via network". After a few seconds, the globe icon appeared next to my phone and I could run and debug my app on my phone.
This worked even when my MacBook was connected to a WiFi network and my phone was using LTE. The only downside is that it was quite slow installing the app to the phone.
Xcode 9 - For detailed info goto Help -> Pair a wireless device with Xcode (iOS, tvOS)
The only way I could get it to work is if my Mac and my iPhone were on different networks. I have a main DSL modem call it network1 and a second network2 setup us an access point. They have SSIDs network1 and network2. If the phone was on network1 and the mac on network2 it would work, or vice versa. But if both were on network1 or both were on network2, it would NOT work.
Enable Internet Sharing using USB ports:
LOL, I was doing all the steps here - I ended up doing the unpairing/repairing steps from the "given by Surjeet" answer. It didn't work, and then I noticed that when I clicked the "connect via network" button, the same yellow box would pop up that pops up when you repair, saying "busy" - I got frustrated and just started hammering the "connect via network" button, clicking it quickly for probably like 15 - 20 clicks - it started spazzing out, but eventually landed on being able to connect to the network. Before that worked, I also shut my wifi off and turned it on again, as suggested by one of these answers, but clicking the "connect via network" button really fast did the trick...LOL
Also, before I hammered the button, I linked the device support folders, although I'm not sure if it did anything:
open the terminal
cd
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
ln -s 13.3 13.4
ls -l 13.4
restart Xcode and retry run on device
Said to do it here - https://forums.developer.apple.com/thread/126940 - I edited the folder version in my comment to adjust to the latest version of iOS 13.4.
EDIT
I believe I figured out what my problem was, I had to stop my Little Snitch network filter. Also, after I was able to connect by hammering the button, the "connect via IP address" option appeared in the dropdown when you right click on the device in the devices manager in xcode, it wasn't there before I was able to connect ultra-hacky style the first time. If I connect, and then turn my network filter on, it disconnects my phone.
Step 1 : First time connect phone with Cable
Step 2 : Go to Organizer & Devices
Step 3 : Tick Connect as Network
Now simple trick which works everytime.
Step 4 : Turn on hotspot on iphone
Step 5 : Connect your mac with that hotspot.
Step 6 : Now run the code.
This will always work.

How do you perform wireless debugging in Xcode 9 with iOS 11, Apple TV 4K, etc?

Wireless debugging was recently added as a feature in Xcode 9, iOS 11, and tvOS 11. Apple TV 4K doesn't have a USB port, so it requires wireless debugging. How do you perform this wireless debugging in Xcode?
Set up a device for network debugging
from help.apple.com
Debug your app running on an iOS or tvOS device over a Wi-Fi or other network connection.
Steps to set up iPhone, iPad, or iPod touch
Check that your device has a passcode and add one if it doesn't. Your device must have a passcode to enable remote debugging
The Mac and the iPhone/iPad need to be on the same network to use wireless debugging.
Next, in Xcode
Choose Window > Devices and Simulators, then in the window that appears, click Devices.
Connect your device to your Mac with a Lightning cable.
In the left column, select the device, and in the detail area, select Connect via network.
Xcode pairs with your device. If Xcode can connect with the device using a network, a network icon appears next to the device in the left column.
Disconnect your device.
Now you are ready for debugging over the network.
Sometimes it doesn't work. You might need to restart the device or network connection.
Note: Network debugging requires Xcode 9.0 or later running on macOS 10.12.4 or later, and on the device, requires iOS 11.0 or later, or tvOS 11.0 or later.
Steps to set up Apple TV:
Make sure your Mac and your Apple TV are on the same network.
Choose Window > Devices and Simulators, then in the window that appears, click Devices.
On your Apple TV, open the Settings app and choose Remotes and Devices > Remote App and Devices.
The Apple TV searches for possible devices including the Mac. (If you have any firewall or Internet security, disable/turn it off to allow searching.)
On your Mac, select the Apple TV in the Devices pane. The pane for the Apple TV is displayed and shows the current status of the connection request.
Enter the verification code displayed on your AppleTV into the Device window pane for the device and click Connect.
Xcode sets up the Apple TV for wireless debugging and pairs with the device.
I have tried using Xcode Devices window's Connect via network options. but I am unable to see the "Connected over the network" icon next to the device name. also as soon as remove the USB the "Connect via network" option disappeared. also, the device name appears under the disconnected device list.
But using the "Connect via IP Address..." option, I am able to connect.
Right-click on the device name(Under Disconnected list) and choose "Connect via IP Address...." option.
Type the IP address of the device and chose Connect. (you can find through mobile device Settings > Wi-Fi > Choose the wifi name)
If you have completed all steps given by Surjeet and still not getting network connection icon then follow below steps:
Unpair Device using right click on the device from the Connected section.
Reconnect the device.
Click on "+" button from the end of the lefthand side of the popup.
Select the device and click on next button
Click on Trust and passcode(if available) from the device.
Click on Done button.
Now, click on connect via network.
Now you can see the network connection icon after the device name. Enjoy!
Prerequisite
Your Mac Machine should have at least Mac OSX 10.12.4 or later
Your iOS device should have at least iOS 11.0 or later
Both devices should be on same network.
Steps to Activate
Plug your iOS device with Mac machine from cable.
Open Xcode then from top menu Window -> Devices and Simulators
Chose Devices segment and chose your desired Device from left device list.
On right side you can see open Connect via network, enable this option as shown in attached image.
After few seconds you can see network sign in front of you device.
Unplug your device and use debugging as you're using normally.
Thanks
If after following the steps as described by Surjeet you still can't connect, try turning your computer's Wi-Fi off and on again. This worked for me.
Also, be sure to trust the developer certificate on the iOS device (Settings - General - Profiles & Device Management - Developer App).
Network debugging requires Xcode 9.0 or later running on macOS 10.12.4
or later, and on the device, requires iOS 11.0 or later, or tvOS 11.0
or later.
iPhone
iOS 11 won't be available for 32bit devices, i.e. iPhone 5 and iPhone 5c and below. The first 64bit iPhone is 5s.
iPad
iPad mini 2 will be the oldest iPad with iOS 11 support.
iPod
iPod needs to be an iPod 6 to be able to run iOS.
If you use your devices not only for developing but also for production, be warned that a beta OS is not for the faint hearted ;-)
In the new Xcode9-beta, we can use wireless debugging as said by Apple:
Cut the Cord
Choose any of your iOS or tvOS devices on the local network to install, run, and debug your apps – without a USB cord plugged into your Mac. Simply click the ‘Connect via Network’ checkbox the first time you use a new iOS device, and that device will be available over the network from that point forward. Wireless development also works in other apps, including Instruments, Accessibility Inspector, Quicktime Player, and Console.
Try this!
If facing disconnection issues, try this:
Workaround: Enable airplane mode on your device for 10 seconds and then disable airplane mode to re-establish your connection
I just talked to some Xcode engineers at WWDC and the auto discovery of iDevices is still a little buggy. Also sometimes your phone is not correctly broadcasting. Switching your device on and off can help.
There are a few workarounds/fallbacks:
You can check if your phone is broadcasting with Bonjour Browser (www.tildesoft.com). Look if your wifi address is listed under the service called '_apple-mobdev2._tcp. - 215' (you can find your wifi address here: settings > general > about > wifi address.
As a fallback you can connect to your device by manually entering the IP address (right click on your devices in the Devices window).
However this IP address will be persisted, so if you change networks you'll need to reset this. That option is not available in Xcode yet, but you can do it via the terminal with the following command:
defaults read com.apple.dt.Xcode | grep IDEIDS
This will print an identifier which you need to use in the next command:
defaults delete com.apple.dt.Xcode <identifier>
Now the ip address is cleared and you can enter a new one.
The last option is to create a computer-to-computer network. This works fine, but logically you won't have internet access then.
Try this:
Plug your iOS device into your Mac using a lightning cable. You may need to select to Trust This Computer on your device.
Open Xcode and go to Window > Devices and Simulators.
Select your device and then select the Connect via network checkbox to pair your device.
Run your project after removing your Lighting cable.
You can open Xcode Help -> Run and debug -> Network debugging for more info. Hope it helps.
i followed all the suggested steps, in particular the ones provided from ios_dev but my iPhone was not recognized from Xcode and i was not able to debug over WiFi. Right click on the left panel over my iDevice in "Devices and Simulators" window, then "Connect via IP Address...", inserted the iPhone IP and now it correctly works
For wireless debugging, Mac system and iPhone/Device should be on same network.
For making on same network you can do as -
Either you can start hotspot on Mac & connect that on iPhone/Device or vice versa.
On Mac
OR
On iPhone-
Xcode ► Window ► Devices and Simulators ► select devices Tab ► click connect
via network
https://help.apple.com/xcode/mac/9.0/index.html?localePath=en.lproj#/devbc48d1bad
My problem was about network SSID broadcasting.
I've tried all the solutions above but still couldn't connect my device, there was no 'globe' icon for my device at all. Then I found that for some reason my network had turned its SSID broadcasting off(tho I could still connect the network by inputing the SSID manually). Once I turned the SSID broadcasting on, I could connect my device via 'Connect via IP Address...'.
I tried all answers but nothing worked for me. I ended up connecting to different WiFi network then I was able to debug wirelessly.
I have no clue why it didn't work with the old network
The only thing that worked for me was to connect my phone to my MacBook using Bluetooth. (I did this after first pairing my phone with Xcode while connected via cable per ios_dev's answer above.)
On my phone, I went to Settings > Bluetooth and tapped my MacBook's name under "MY DEVICES" to connect.
I then went to Xcode > Devices and Simulators, selected my phone and checked "Connect via network". After a few seconds, the globe icon appeared next to my phone and I could run and debug my app on my phone.
This worked even when my MacBook was connected to a WiFi network and my phone was using LTE. The only downside is that it was quite slow installing the app to the phone.
Xcode 9 - For detailed info goto Help -> Pair a wireless device with Xcode (iOS, tvOS)
The only way I could get it to work is if my Mac and my iPhone were on different networks. I have a main DSL modem call it network1 and a second network2 setup us an access point. They have SSIDs network1 and network2. If the phone was on network1 and the mac on network2 it would work, or vice versa. But if both were on network1 or both were on network2, it would NOT work.
Enable Internet Sharing using USB ports:
LOL, I was doing all the steps here - I ended up doing the unpairing/repairing steps from the "given by Surjeet" answer. It didn't work, and then I noticed that when I clicked the "connect via network" button, the same yellow box would pop up that pops up when you repair, saying "busy" - I got frustrated and just started hammering the "connect via network" button, clicking it quickly for probably like 15 - 20 clicks - it started spazzing out, but eventually landed on being able to connect to the network. Before that worked, I also shut my wifi off and turned it on again, as suggested by one of these answers, but clicking the "connect via network" button really fast did the trick...LOL
Also, before I hammered the button, I linked the device support folders, although I'm not sure if it did anything:
open the terminal
cd
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
ln -s 13.3 13.4
ls -l 13.4
restart Xcode and retry run on device
Said to do it here - https://forums.developer.apple.com/thread/126940 - I edited the folder version in my comment to adjust to the latest version of iOS 13.4.
EDIT
I believe I figured out what my problem was, I had to stop my Little Snitch network filter. Also, after I was able to connect by hammering the button, the "connect via IP address" option appeared in the dropdown when you right click on the device in the devices manager in xcode, it wasn't there before I was able to connect ultra-hacky style the first time. If I connect, and then turn my network filter on, it disconnects my phone.
Step 1 : First time connect phone with Cable
Step 2 : Go to Organizer & Devices
Step 3 : Tick Connect as Network
Now simple trick which works everytime.
Step 4 : Turn on hotspot on iphone
Step 5 : Connect your mac with that hotspot.
Step 6 : Now run the code.
This will always work.

In Xcode I see (no paired Apple Watch) even though the watch is paired and the watch's UDID is registered

My phone is listed as an ineligible target in Xcode and out to the side it says (no paired Apple Watch).
My Apple Watch is registered under iOS Devices. I can see the UDID. The watch has watchOS 2.0 installed and my iPhone 6 has iOS 9 installed. The iPhone pairs just fine with the watch and I can install apps.
I've tried rebooting both the watch and the phone. I've tried rebooting Xcode. I tried creating a new scheme in Xcode but it still shows (no paired Apple Watch). I can choose Product/Destination and the app will show up on the phone, it just won't install the watch app...just sits there saying "Installing...".
I had paired my watch with a new phone and run in to this problem. I removed all files in ~/Library/Developer/Xcode/watchOS DeviceSupport/ and it solved it!
2022, 5 year anniversary: For the past 6 months, I consistently have to sit through one hour of "Preparing Apple Watch for development via iPhone" even when I'm not even debugging a Watch app. Needless to say, this also makes it impossible to run apps on device via Xcode. After about 3 hours (basically half my workday) it starts to work. Once I remove the app for testing, or unplug the iPhone, I have to wait a few hours again. Never in my life have I felt so useless as my job at this point basically consists of watching a loading indicator for hours until the process is done - only for the whole thing still not working most of the time.
Fun fact: Apple on Twitter claims they use the same devices and tools for their Watch apps.
2021: All Quiet on the Western Front. It's been 4 years since my first response. I've now had a good run during December and the first 2 weeks of January. It was so good that I haven't closed the simulator a single time and kept my iPhone connected and never turned off my mac. This worked for 3 weeks but then my iPhone ended up in a boot loop and restoring fails. I bought a new iPhone and now I also can't really connect anymore. See y'all in 2022 :)
2020: At this point I can't even get WCSession to send data on the Simulators anymore. Message from Watch to iPhone with replyHandler works, message from iPhone to Watch fails with WCErrorCodeWatchAppNotInstalled. Every day starts with rebooting numerous times and deleting and setting up new iPhone + Watch combinations. Tried on a freshly installed macOS with my friend's devices and of course no luck. But it's clearly my fault. Submitting a bug report doesn't do anything as they only keep telling you that everything is working on their end and they will close this ticket now. I only wanted to help.
2019: New iPhone, even worse. Now, every single component in my development has changed since 2017 and I'm still stuck targeting the simulator with every build. Apple, why?
2018 II: nothing works for me anymore. Contacted Apple loads of times and Apple Watch seems to have moved to Playground's neighborhood as it's just loading/running but never really running. Bought a second Mac, new project, nothing works. Sad.
2018: The last couple of days I have been really successful doing the following:
On your iPhone:
turn off wifi
turn off bluetooth
turn on wifi
turn on bluetooth
On your Watch:
turn on flight mode
deactivate flight mode
Most of the times it didn't take longer than 30 seconds to get the connection back on track. I think it's the "Watch flight mode"-thing but I never change a (somewhat) running system so this will be my procedure from now on. My 2017-reply still seems to be of help to some people:
2017: If it SOMETIMES shows, and often doesn't, it might be due to the fact that you closed iTunes
I noticed what I often did after reconnecting: closing iTunes. Immediately, the watch turned to be "unpaired". Reconnecting the USB cable but leaving iTunes open has helped me since.
What worked for me is to go to the WatchKit App target and update the Team with the proper account. Once I did that, my device showed as eligible.
Open the camera companion app on the watch. For me this works. Seems like the app starts a phone connection.
It seems that you need to tap on the "Trust this computer" message on Apple Watch. This solved my problem. Also check if XCode displays the message "Indexing..." or "Loading symbols...": you need to wait until the operation is over.
It looks like a bug in Xcode!
Go to ~/Library/Developer/Xcode/watchOS DeviceSupport/ and create a folder named "Watch1,2 2.0 (build number)" and for 'build number' use your watchOS build number. Inside this folder create another folder named "Symbols".
So for the latest build: ~/Library/Developer/Xcode/watchOS DeviceSupport/Watch1,2 2.0 (13S5305d)/Symbols.
Maybe clean & restart Xcode.
For me it was an issue of trusting the computer from the watch. I had to reboot my watch to get the "trust this computer" request.
In my case I believe it was because I had Connect via network enabled for the iPhone that's paired with my new watch.
Upon disabling the wireless connect feature, then connecting the iPhone to my mac via cable, the watch appeared in the Devices list.
After getting the UUID to register with the Developer Center I re-enabled Connect via Network and the watch was no longer listed on the Devices screen. When I connect the phone via cable, however, the watch info appears.
So if you're using wireless connect, try just plugging the device in via cable and hopefully you'll see your watch in the list. Good luck!
I had to delete my Apple ID from the Accounts tab in Xcode preferences and then re-add it.
What worked for me is just waiting for about a minute. There was no progress bar in Xcode, just wait.
For me helped open iTunes at the MAC and leave it open.
Xcode 9.4.1
Check the phone is connected to the same wifi network as the computer.
I've just spent a few days struggling with this, trying the solutions above. Switched networks, waited a minute, now it works again. Gah.
I have four wifi SSIDs in my home (old house, thick walls, one router won't cover it properly) and it turned out the computer was choosing one, and the phone another.
I have the exact same setup and had the same problem. What seemed to work for me was just unpairing and pairing the watch again. Then Trust this computer on the watch and Xcode started to list it in the menu.
It seems that I updated the watchOS2 beta 5 on top of 1.0.1 which was paired earlier and it just needed to be re-set for watchOS2.
What worked for me was to open Xcode's Projects window and click the Delete button next to the Derived Data line for the currently open project. After that, the target automatically switched to show [My iPhone Name] + [My Watch Name].
My setup: Xcode 7, iOS 9 (public release), and watchOS 2 beta.
Open Watch app on device, scroll down to your app, and make sure to enable show app on apple watch
Setting Correct Provisioning profiles | Certificates | Team, then restarting Xcode worked for me.
You must have connected your Apple Watch with you iPhone by bluetooth, wifi connection won´t work for testing...
I really struggled with this problem but this helped me:
Fix steps :
Unpair my watch
Reboot both iPhone and apple watch
Pair them again,and setup my watch as a new one
Plug (unplug first) iPhone to Mac
On apple watch, say Trust the computer when it asks
Unplug and plug again
Close and open XCode
Open the project and wait a few seconds
I may have had a breakthrough....I turned off WIFI on my Mac and it instantly found the watch 😱
This worked for me (Xcode 11.3.1) :
Open Devices from Xcode
Disconnect iPhone from Mac
Disable bluetooth on iPhone
Re-connect iPhone to Mac
Verify iPhone is showing in Devices.
Turn on bluetooth on iPhone, wait to see that watch is connected on iPhone.
Look in Devices -> your iPhone -> Paired watches -> wait for the watch info to completely show.
At this point I was able to see watch in Xcode.
In some cases also needed to restart Watch & Phone as well.
This worked for me
1. Quit Xcode.
2. Disconnect iPhone
3. Remove cache files at /Users//Library/Developer/Xcode
4. Run Xcode.
5. Connect iPhone again
6. Xcode will start to download the symbol file
Just reconnect my iPhone to my Mac is solved my problem. When i reconnect my iPhone, xcode installed itself missed symbols automatically.
I had a similar issue where Xcode was not detecting my paired watch. Somehow, the beta provisioning profile had managed to get installed onto my phone and for some reason Xcode could not detect the paired watch. As soon as I deleted the provisioning profile, Xcode started to pick up the paired watch.
Creating a new watchOS project lead to download of symbols to resume and finish.
I unplugged the iPhone before "Processing symbol files" operation was finished. So Apple Watch never showed up again.
XCode 9 (beta 4). iOS 10 (beta 4). watchOS 2.2.2.
I just waited several minutes and then - it worked by itself.
WatchOS 4.1, XCODE 9.2.
The solution that worked for me with XCode 10.0: trash the whole Xcode folder in ~/Library/Developer/Xcode, removing only the watchOS DeviceSupport was not enough
New update to this issue. I have recently buy the ray wenderlich book for Watch OS and I have had this problem.
After testing a lot of things, and before delete any files, my working solution is this:
On MAC with Xcode open and with the issue scheme loaded. iPhone plugged in and watch turned on too.
1) On MAC turn off wifi
2) On MAC turn on wifi
3) On MAC turn off bluetooth
4) On MAC turn on bluetooth
I know this solution is above, but is the only way it has worked for me. Hope it helps to any dev too.
Check that Bluetooth is enabled. I restarted my Mac, my phone and my watch and that didn't help. When I looked in settings on the watch I found that Bluetooth was disabled.
In my case, rebooting the watch did not work, but after rebooting iPhone it did.
Xcode Version 12.2 (12B45b) seems to fixed all issues regarding the app transfer from your mac to your apple Watch.

iOS – Run/Debug/Install builds over Wi-Fi

We have iPad and iPhone devices, but short of wires. Is there any way that we can install/debug the builds over Wi-Fi in iOS?
I know the way in Android, but not of iOS.
Now by using Xcode 9 and iOS 11 it is possible to run apps by using Wi-Fi.
Connect the iPhone via USB, go into the device window (Cmd-Shift-2), select your phone, and check the connect via network box.
More thorough instructions with screenshots here
Pre-Xcode 9 answer:
Over Wi-Fi installing and debugging of applications is not possible in iOS.
But there are some websites where you can upload your builds and then download on device and test it.
(Before you read make sure your running IOS 11 and Xcode 9!) Connect your device (Via USB), once you do go on 'Add Additional Simulators' (See image 2 at the bottom), and tick 'connect via network' (See Image One). Once XCode proccesses this, disconnect the device (via USB) and it should now appear with a globe next to it (See image 2)! Also make sure the device and computer are on the same network!
Image 1
Image 2
Simple Solution: http://diawi.com
Upto Xcode 8 & iOS 10 : Through wifi its not possible.
You just upload your ".ipa" file to this website http://diawi.com & get sort link for that. After that install build by requesting that link in iphone browser.
From Xcode 9+ & iOS 11+ : Its possible install debug build through wifi.
Open your project on Xcode
Connect your ios device with USB cable.
In xcode menu open Window -> Devices and Simulators or press (Cmd-Shift-2). You should see your device as connected devices.
Select your device and enable check box “Connect via network”.
Now you can see a network icon next to your phone name. This icon confirms that you can able to run build in wifi.
Now run your build through wifi to install build in your ios devices.
Using Xcode 9 you can debug over wifi(same network).
Make sure you have at least Xcode 9 or later and a device with iOS 11 or later
1- Open your project on Xcode
2- Plugged in your iPhone with USB cable.
3- Open Window > Devices and Simulators
You should see your device as connected devices
4- Select Devices from the top, Select your device from left and Check the “Connect via network” box
5- Now if Xcode can connect to your device via network, you should see a network icon after your phone name
6- Unplug your USB cord
7- Go back to Xcode and Hit the Run button
For deployment/CI I have tried and highly recommend BuddyBuild solution, here is some of the many features it has:
Excellent user help (chat/email) system and online service.
Supports webhooks so that a build is started whenever you push to your App repository. (All Git source control repos supported)
You can arrange system to auto send your builds to a preset list of testers/users whenever builds are ready.
You can [Auto] integrate their SDK to allow user feedback and crash reports.
It auto checks your app for compatibility with latest Xcode versions.
To activate a Wireless Debugging for iOS device to Run|Debug|Install your builds over Wi-Fi, you need to take six steps:
Connect a device via USB cable to the Mac with macOS 10.12.4+ and Xcode 9+ installed.
Launch Xcode.
Press Shift-Command-2 or go to Window-Devices and Simulators menu.
In the Devices tab select the devices from the Connected section.
Select the Connect via network checkbox (and wait for a few minutes when it's finished).
Disconnect USB cable.
This Network icon in the left panel means – Wireless Debugging is OK.
On iPhone go to General–Device Management–Application to trust and press TRUST.
Now you can Run | Debug | Install your builds over Wi-Fi.
To do this, connect your iOS device to your Mac using the appropriate USB cable, and select the Window tab in the menu bar, open the Devices and Simulators window by selecting Devices and Simulators from the Window dropdown or Cmd + Shift + 2.
Ensure that your device is selected in the list farthest to the left in the Devices and Simulators window. Check the Connect via network box.
If your device is on the same network as your Mac, you’ll see a globe appear next to your device’s name within a few moments. This indicates that your device is wirelessly connected.
You can now disconnect the USB cable connecting your device to your Mac, and build and run your app wirelessly.
Please check out this tutorial,
http://honzadvorsky.com/articles/2015-10-21-17-40-xcode_server_tutorials_4_certificates__provisioning_profiles/
here you can find a way for "App Installation over Wi-Fi"
I have not get a chance to implement it yet, but may be will try it out asap. meanwhile if someone is free then can try and post their view here so others can get help. Thanks
Requirements: iOS 11 and XCode 9, iOS device and computer on same wifi network.
Connect your device with USB Cable, launch Xcode, then on Xcode menu, choose: Window->Devices and Simulators. Choose device and check "Connect via network". Now you can disconnect USB and develop on device using wifi.
ScreenShot
" http://diawi.com "
this provides you build link of your project.
Whereas with wifi its not at all possible.
Wireless debug requires Xcode 9 or later and iOS 11 or later. Check this link. Here are detail steps to connect device for wireless debugging.
Connect the iOS device via USB. Go into the device window (Cmd-Shift-2), Select your device and check [x] connect via network. Remove USB cable and IMPORTANT: Connect your device via Personal Hotspot.
Agree with Amr I have found buddybuild as Jenkins+Hockey in one. Extremely useful and so far it seems good product.
With buddybuild you dont need to ask anyones UDID of their iOS device. Also I use it for test automation, where they give you freedom to spin whatever you want as long as you know how to set it up in their postbuild and prebuild scripts
To add to the above answers, for me the Mac and the iPhone should be connected to the SAME wifi network. Otherwise it will not recognise each other.
Over Wifi app installation is possible after we generate an IPA .
Create a plist file with bundle identifier
(See apple documentation for steps )
Create a HTML file
(give the source of IPA (link tag) and bundle identifier / Provisioning profile)

Resources