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!

Quick Review

Before you move on, let's take a look at what we just did:

Xcode not only allows you to build on a simulator (i.e. a fake iPhone that runs on your computer) but also on your physical iPhone or iPad.

In order to do this, we had to set up your iCloud account with Xcode, which lets your phone know that the incoming app is from you, and isn't going to do anything evil or malicious. Next, on your phone, you had to set yourself up as a trusted developer. This tells the device that the incoming app is coming from you.

Wondering why this process seems so needlessly complex? It all comes down to security. Apple wants to make sure that someone can't just plug into your phone and install an app that would steal all of your personal information, track what you type, or even watch your location!


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

Summer academy

An iOS Development Summer Course

Design, code and launch your own app. Locations in San Francisco and Asia

Find your location

Product College

A computer science college

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

Learn more

Cookies on Make School's website

We have placed cookies on your device to ensure that we give you the best experience on our website.

This site uses cookies to deliver our services. By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Your use of Make School’s Products and Services is subject to these policies and terms.

Please note that Make School no longer supports Internet Explorer

We recommend upgrading to a modern web browser. Learn more