Launching on a device

Overview

Up until this point we have launched and interacted with all of our apps in the simulator. But what if you want to test your app on an actual iOS device, such as your iPhone? Nothing to it — Apple’s documentation walks you through the whole process, and once you’ve done it once you’ll never have to repeat most of the steps.

Follow Apple’s official instructions for both steps below:

  1. Provisioning the team profile
  2. Launching Your App on a Device

Key Takeaways

  • Before launching on a real device, add your Apple ID to Xcode (Xcode → Settings → Accounts) and let Xcode automatically create a provisioning profile — you only need to do this once.
  • Connect your iPhone via USB and select it as the run target in Xcode’s toolbar; it will appear once the device is unlocked.
  • The first build to a device takes longer than the simulator; subsequent installs are much faster.
  • If your iPhone shows “Untrusted Developer,” go to Settings → General → VPN & Device Management, tap your developer name, and tap Trust.