Applications open until spots fill up - Apply now.

Running it on a device

Running it on a device

April 16, 2017
Expand

Project: Tip Calculator in Swift 3

Running your code on your device used to be a complicated process that required a paid membership to Apple's Developer Portal. But now, it is literally one click! (With a lot of extra clicks).

  1. Plug your iOS device into your Mac using a lightning cable.
  2. Unlock your phone and click "trust" if prompted.
  3. On the top left section of the Xcode window where it says iPhone 6S Plus (or something similar), select your device from the drop down menu. (If it says your device is unavailable because of the version, lower the Deployment Target in the project settings).
  4. Click the Run button on the top left. It will tell you that there is no team selected, and that you need a team to run on the device. No team selected
  5. Let Xcode fix this issue for you by logging in with your Apple ID or iCloud account. This is the same you use to download apps in the App Store. If you do not have an Apple ID Xcode will let you create one, and follow the onscreen steps in order to do so. Sign into iCloud
  6. Click the Run button again. You may get an error that the device is not available yet because it is processing symbols. If so, there will be a progress bar you can watch while you wait. Then you can run it again. Processing symbols

Trusting yourself

But wait! Thats not all! Apple is very serious about security, and when you side-load apps, they have not been screened in the same way ones from the App Store have, so you have to Trust the profile that Xcode just created for you that lets you run apps on your phone.

Trusting yourself

  1. On your iPhone, open Settings and then General and then Profiles and Device Management Profiles and device management
  2. Select your Apple ID
  3. Click Trust <your Apple ID> Trusting yourself again
  4. Click Trust again.

Great! Now you should be able to run the app. Try hitting the run button in Xcode again! If you want to run it in the simulator later, you can select the simulator in the same way you selected your device earlier!

Feedback

If you have feedback on this tutorial or find any mistakes, please open issues on the GitHub Repository.

Summer academy

An iOS Development Summer Course

Design, code and launch your own app. Locations across the USA and Asia

Find your location

Product College

A computer science college

Graduate into a successful career as a founder or software engineer.

Learn more