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?
-
3Was anyone really successful in doing a wireless debug? I had followed the same steps, but it keeps showing iphone is disconnected when i try to do a wireless debug. Connected debug works fine. – SeriousSam Jun 06 '17 at 08:42
-
2@SeriousSam It works. You need to be on the same network. – badhanganesh Jun 06 '17 at 10:47
-
I have checked the wireless debug, it is working fine – iPC Jun 06 '17 at 11:03
-
1Got it working here even using another tethered iPhone as WiFi support. – Jonny Sep 20 '17 at 04:38
-
Yea currently using it while tethering from the iPhone and using VPN on my macbook. No probs at all. Just getting frustrated with the iPhone locking - not only if falls asleep but the Xcode requires it to have passcode/touchID enabled. I can't make it stay awake as it does when connected with cable. – Dan Sep 22 '17 at 06:54
-
1The connection gets disconnected after say 10-20 seconds!. Any Ideas Why So,? Thanks! – UserID0908 Dec 20 '17 at 09:59
20 Answers
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.

- 14,854
- 11
- 100
- 103

- 11,691
- 2
- 37
- 54
-
@Balasubramanian Hope your device having iOS 11 and using xcode 9. – Surjeet Singh Jun 07 '17 at 06:16
-
Thinking the same, there is no way i'm gonna install ios 11 beta 1, this build is so broken i'm surprise people are even taking the chance on upgrading to it – thibaut noah Jun 07 '17 at 10:50
-
@elGeekalpha Yes, iPhone and MAC should share same network to use wireless debugging. I'll edit my answer and add this. Thanks – Surjeet Singh Jun 07 '17 at 18:03
-
It looks like the devices have to be on the same network. Could you add it to the answer? Thanks! – elGeekalpha Jun 07 '17 at 18:07
-
@elGeekalpha I have added your suggestion, Thanks for reminding me. – Surjeet Singh Jun 07 '17 at 18:08
-
@Surjeet I am getting an error : 'Device doesn't support wireless sync' – SandeepAggarwal Jun 08 '17 at 09:32
-
@SandeepAggarwal Which device are you using and what you have done so far ? – Surjeet Singh Jun 08 '17 at 09:54
-
I am using iphone 6 plus, I have followed all the steps u have listed above. If I make a hotspot from my mobile data and use it in my mac, the app installs wirelessly but if they are connected on same wifi then it shows the error – SandeepAggarwal Jun 08 '17 at 10:07
-
13For me it wasn't working initially. But when I restarted the device it started working. Thanks Apple for wifi debugging :) – Vinay Kumar Jun 08 '17 at 10:10
-
1
-
I am able to run applications over wifi. But if I try to run XCTest cases then it is throwing error: Device doesn't support wireless sync. I have turned on wireless sync option in iTunes, still I am facing same issue. – Chandra Lakkimsetty Jun 20 '17 at 12:02
-
My Mac has only one USB, and Wireless is broken, so I have only 1 USB port for Wireless Dogle and iPhone . Is there anyway to setup this with just 1 USB port? – John Jun 21 '17 at 05:13
-
Is it possible to build and run wirelessly with `xcodebuild` from the command line? – dazonic Jun 21 '17 at 10:50
-
1yes. Its possible. Same xcodebuild commands work for wireless case as well. Based on the destination, it checks whether device is connected over usb or wifi. – Chandra Lakkimsetty Jun 23 '17 at 06:26
-
It worked for me after I unpaired my iPhone (In the device list in Xcode right click on the iPhone and then click unpair) and paired it again. – Palle Jul 03 '17 at 22:46
-
Even for me it was not showing the Network icon indicated in the answer,however it showed up once I restarted the device. Thanks @Surjeet! – Abhilasha Jul 12 '17 at 11:10
-
1@Surjeet: I can see the devices listed even if it is not connected by cable, but when I try to run the app, it gets stuck at Signing product and the Xcode 9 hangs. It won't respond and I have to kill the Xcode. – Abhilasha Jul 12 '17 at 11:49
-
-
@SANTOSH - I gave my phone a reboot and tried again. It worked after the reboot. – Magnas Jul 14 '17 at 12:49
-
1
-
4@Lacek As per my understanding is not possible the wireless debugging over VPN. Will check any workaround to do that, if anything get will update here. – iPC Aug 30 '17 at 07:06
-
4Super important remark when connecting to Apple TV via network: it doesn't work when your Mac is also connected to Apple TV via USB. – Ely Sep 22 '17 at 17:16
-
Note, this will only work if the device (checked with Apple TV 4) was previously not paired already. Just unpair it in case, and then follow the instructions listed above. – Chris Sep 23 '17 at 18:47
-
2Is it possible to setup remote debugging without connecting via cable since I don't "lightning to usb-c" adapter for mac macbook pro? – Serge Sep 29 '17 at 09:23
-
@Sergio No, you can't. You have to connect once via cable. After that you doesn't required cable for that device. – Surjeet Singh Sep 29 '17 at 09:37
-
This should me put on top of answer **NOTE: Mac system and iPhone/iPad should share same network to use wireless debugging.** – Jack Dec 06 '17 at 05:10
-
This answer did not work for me on this step of this answer: 4. The Apple TV searches for possible devices including the Mac. I needed to turn off my Mac Firewall and McAffee Internet security for this to work. Someone with edit capability should add that to the answer. – Jim Range Jan 20 '18 at 19:04
-
Note: After setting up the Apple TV, I of course re-enabled my firewall and internet security and all continued to work. Only need to disable them so that the apple TV could discover the Mac. – Jim Range Jan 20 '18 at 19:24
-
Are there any news about combining this feature with VPN? It would allow using a remote server for building and debugging iOS which would be a huge advantage – Luz Jan 28 '18 at 01:42
-
It connects after manually entering the device IP Address. (connect remotly) – AsimRazaKhan Mar 21 '18 at 10:53
-
if your device was previously paired WITHOUT passcode then after enabling passcode in device settings you have to re-pair device again – user924 Apr 16 '18 at 11:45
-
But it's really don't work! i already restared my phone, restarted Mac, change type of local (wifi/3G/LTE), change wifi router (Asus/TP-LINK/D-LINK/Netis) no one normal solution, sometimes i can connect to debug but it's sometimes it's very very seldom. Apple create awesome idea for debug via wifi but like usual it's working sickeningly! – Genevios Jul 14 '18 at 10:23
-
I had to turn off the Firewall, pair de Apple TV, then it worked, even turning the Firewall back on after pairing. – neowinston Jan 06 '19 at 18:21
-
This works nice for me, except that it is considerably slower to install a dev build on a device wirelessly than through a wire – Bradley Thomas Jun 29 '19 at 18:51
-
2@Luz I can confirm that this feature can be combined with OpenVPN to debug from a remote server using a fairly standard OpenVPN configuration on Mojave. I have a few more details [here](https://stackoverflow.com/a/59549940), but if anyone needs detailed instructions, feel free to contact me. – fakedad Jan 01 '20 at 04:13
-
Many times I've found that this feature is really hard to get working in company/office environments; likely the company is blocking necessary ports etc. Also when using Cisco AnyConnect Secure Mobility Client on macOS (a utility to connect macOS to a remote network through VPN), that utility also, unfortunately, blocks/hinders use of Xcode network connections to iOS devices, even on the local WiFi network. DOH. – Jonny Apr 09 '20 at 03:42
-
1**imp tips to connect:** On your Apple TV, open the Settings app and choose Remotes and Devices > Remote App and Devices. (and Stay on this screen don't go back if you are already connected or searching for new) – Anup Gupta Jan 13 '21 at 07:59
-
My case: Restart iPhone and reconnect MacBook Wifi then check it again. It works. – Veck Hsiao Mar 03 '21 at 16:41
-
-
-
You should be connected with same network on mac and iPhone to debug wirelessly. – msmq Jul 13 '23 at 15:01
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.

- 5,148
- 2
- 27
- 31
-
12
-
@Shyam Both phone and mac use same wifi ? Also double check you use compatible Xcode. – damithH Nov 22 '17 at 02:39
-
I'm pretty sure that both was using same WiFi and Xcode version is 9.1, MacOS 10.13.1, iPhone 11.1. Problem was with the network I hope, it worked when I used different network – Shyam Nov 22 '17 at 12:10
-
Same with me. But some times works and some time doesn't work... I need close and open my xcode several times to work. Both was using same WiFi and Xcode version is 9.1, MacOS 10.13.1, iPhone 11.1. – Wagner Sales Jan 19 '18 at 16:26
-
1@Shyam it takes a bit..but it works, this is the only solution that worked for me. Thanks damithH! – greaterKing Jan 15 '19 at 14:58
-
1
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!

- 1,025
- 15
- 27
-
Does it have any condition like range limitation? because when i Connected it it started launching my application and got disconnected? – UserID0908 Dec 20 '17 at 06:14
-
I can't see the network connection icon after the device name. Is this issue related to wifi connection? – pallavi Apr 16 '18 at 09:40
-
YES IT worked, I guess it's because it was previously paired without PASSCODE, but when we enable passcode in device settings we need to re-pair device again – user924 Apr 16 '18 at 11:44
-
maybe yes, If your device isn't connected through a wifi then it will not appear @pallavi – ios_dev Apr 16 '18 at 11:47
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

- 3,173
- 5
- 33
- 71
-
2Have you read @Surjeet’s answer? This answer don’t add any remarkable value and makes the post unnecessary large. – elGeekalpha Jun 07 '17 at 13:59
-
1@elGeekalpha i started following surjeet answer but he didn’t mentioned about same network by this i was facing issue while connecting via network. Yes my answer is large but not unnecessary as i did mistake others user will not and also this answer will help newbies too. Hope you understand and other will ger help too: enjoy coding – Aleem Jun 07 '17 at 14:38
-
Sorry, I didn’t want to be rude but the first impression seemed to me that you had written that without reading it. Thanks for the explanation and enjoy the WWDC17 too! – elGeekalpha Jun 07 '17 at 15:15
-
3"After few seconds you can see network sign in front of you device. " < this detail helped me – Jonny Sep 20 '17 at 04:35
-
1
-
@Muju could you please look try this answer: https://stackoverflow.com/a/46320665/671060 – Aleem May 22 '18 at 07:09
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).

- 1,842
- 14
- 16
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 ;-)

- 76
- 1
- 9

- 2,903
- 3
- 43
- 53
-
2iOS 11 is compatible with these devices. iPhone iPhone 7 iPhone 7 Plus iPhone 6s iPhone 6s Plus iPhone 6 iPhone 6 Plus iPhone SE iPhone 5s **iPad** 12.9-inch iPad Pro 2nd generation 12.9-inch iPad Pro 1st generation 10.5-inch iPad Pro 9.7-inch iPad Pro iPad Air 2 iPad Air iPad 5th generation iPad mini 4 iPad mini 3 iPad mini 2 iPod iPod touch 6th generation – Giang Jun 09 '17 at 09:34
-
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

- 9,564
- 146
- 81
- 122

- 3,344
- 1
- 28
- 50
-
1
-
@Lacek I am not sure but I doubt, both devices should be connected to same WiFi network. – D4ttatraya Aug 22 '17 at 12:34
-
I also doubt, but once I have been surprised what is the solution to the "I will not download more than 100 MB over a cellular network" message from iOS - you tether cellular to a mobile phone (by a USB) and share it as a WIFI, and then iOS think it is using a WIFI... I was hoping for a similar hack, this time more involved. – Aug 22 '17 at 12:49
-
2
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.

- 844
- 7
- 18
-
It seems in beta 4 there is no more option to set IP manually. :( On a side note, I couldn't make my iPhone 6s with beta 4 to connect to Xcode 9 beta 4. – iur Jul 25 '17 at 16:09
-
1To be able to see the set ip address option I had to unplug the device from the usb port – dominic Oct 06 '17 at 06:37
-
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.

- 33,281
- 23
- 160
- 191

- 1,204
- 1
- 12
- 16
You can open Xcode Help -> Run and debug -> Network debugging for more info. Hope it helps.

- 189
- 1
- 5
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

- 162
- 2
- 9
-
2It's important to note: the device needs to be disconnected from the system in order for this option to show up. – MichaelC Oct 12 '17 at 16:52
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.
OR
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

- 13,571
- 6
- 76
- 98
-
When my iPhone XS Max is set to Personal Hotspot and I connect my macbook pro to it, I then cannot use the iPhone as a debug device. The only case of wireless debugging that works for me is to connect them both to the same wifi router. This is very annoying when coding on the go. I always have to carry a cable with me. – Vilmir Apr 23 '19 at 13:55
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...'.

- 111
- 4
-
Please provide a more complete description of the issue that you faced. Atleast how it solves the question about 'how to perform wireless debugging?' If this is a separate issue please create a new question and answer it – Dhruvan Ganesh Oct 26 '17 at 13:36
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

- 366
- 1
- 2
- 10
-
It didn't work for me on my network. Connecting to the bluetooth sealed the deal... not sure if it helped in any way or how... – Swift Rabbit Apr 03 '18 at 20:45
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.

- 9,156
- 2
- 42
- 58
-
Indeed! After trying everything else found around, connecting to my Mac in bluetooth worked instantly. – Johnny Oin Nov 12 '19 at 13:35
Xcode 9 - For detailed info goto Help -> Pair a wireless device with Xcode (iOS, tvOS)

- 366
- 1
- 2
- 10
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.

- 2,285
- 2
- 21
- 22
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.

- 2,801
- 4
- 52
- 110
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.

- 1,730
- 2
- 15
- 27