How to use Wireless Debugging on Xcode 9
Yes you heard it right, Wireless Debugging 👻 We were waiting for this moment and finally Apple announced wireless debugging feature on Xcode 9 at WWDC 17.
First lets look at how Apple introduce this feature on their website:
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.
Now here is how you can get rid of your USB cord in details 🙌
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 (Just for the first time 🤣)
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
👏 Congratulations you made your first wireless debugging 😎