Run an app on a wireless device (iOS, tvOS, watchOS)

After you pair a device with Xcode, you can launch your app on the device over Wi-Fi or other network connection. If your Mac and the device are on the same network, you can connect to the device using Bonjour. In the Devices and Simulators window, a network connection icon indicates whether the device was discovered. Otherwise, you can connect to a network device using its IP address.

Tip: If a network device you previously paired is disconnected, it may be asleep. To keep your iOS device from sleeping during testing, open Settings, tap Display & Brightness, tap Auto-Lock, then tap Never.

If you use automatic signing (recommended), Xcode creates the necessary signing assets for you in your developer account. Before you begin, add your Apple ID account and assign the target to a team. If the team belongs to a developer program, you’ll need to explicitly register the device before you run the app.

Run on a device using Bonjour

  1. Connect your Mac and the device to the same network.

  2. In the toolbar, choose the target and device from the scheme menu, then click the Run button.

  3. If a dialog appears because the device is not registered, click Register Device(s).

Run on a device using an IP address

  1. Connect your Mac and device to a network.

  2. Choose Window > Devices and Simulators, then in the window that appears, click Devices.

  3. In the left column, Control-click the device, then choose Connect via IP Address from the pop-up menu.

  4. In the dialog that appears, enter the IP address of the device and click Connect.

    In the left column of the Devices and Simulators window, the device should appear under Connected with a network icon next to the device name.

  5. In the toolbar, choose the target and device from the scheme menu, then click the Run button.

  6. If a dialog appears because the device is not registered, click Register Device(s).

See alsoPair a wireless device with Xcode (iOS, tvOS)Troubleshoot a wireless device (iOS, tvOS)