Develop your skills in iOS development by understanding how to set up an Apple Developer account, and prepare your iPhone to run the apps you create directly from Xcode. This tutorial provides a step-by-step guide for successfully running your own apps on your iPhone and submitting them to the app store.
Key Insights
- Creating an Apple Developer account is fundamental for submitting apps to the app store. This involves visiting developer.apple.com, signing in with an existing account or creating an Apple ID, agreeing to Apple's terms and joining the Apple Developer Program.
- Running apps directly from Xcode on your own iPhone requires registering your device. This involves plugging your phone into the computer, selecting your device on Xcode, and copying the device identifier.
- After copying the device identifier, you need to register your device on the Apple Developer site under 'Certificates, IDs & Profiles' and then under 'Devices', by pasting the device identifier.
- Once your iPhone is set up, you can run your own apps. However, you will need to make sure the correct 'Team' is selected for any existing apps to preview on your iPhone.
- In order to run the app on your iPhone, under the active scheme, choose the device you just plugged in instead of the iPhone 8 simulator. Finally, hit the 'Run' button.
- This tutorial provides an essential guide for aspiring iOS developers, paving the way for them to create, run and submit their own apps to the app store.
Discover how to set up an Apple Developer account and prepare your iPhone to run the apps you create in our comprehensive iOS development tutorial.
This exercise is excerpted from Noble Desktop’s past app development training materials and is compatible with iOS updates through 2021. To learn current skills in web development, check out our coding bootcamps in NYC and live online.
Topics Covered in This IOS Development Tutorial:
Creating an Apple Developer Account, Registering Your Device to Run Apps Directly from Xcode
Exercise Overview
Here you will set up an Apple Developer account so that you can submit apps to the app store, and provision your iPhone to run the apps you create.
Setting up an Apple Developer Account
- With a browser, go to developer.apple.com
- Click Account to sign in with an existing account or create an Apple ID.
- Agree to whatever Apple asks in their terms, then hit Submit.
- Click on Join the Apple Developer Program (it’s in the middle of the page).
- Click on Enroll (upper right).
- Click Start Your Enrollment, and follow the prompts.
Setting up Your Phone to Run Your Apps
Sometimes you will want to see an app run on your phone. This can be useful if you want to show the app to people without carrying around your laptop.
- Plug your phone into the computer using a Lightning Cable.
- In Xcode, go into Window > Devices.
- Select the Device on the left.
- Next to Identifier, select by double–clicking and copy the device identifier. It is a long alphanumeric value in the center of the screen.
- Go back to the Apple Developer site with your browser.
- On the left, click on Certificates, IDs & Profiles.
- On the left, under Devices, click on All.
- If you already created a developer account in the past, you may get a message in yellow saying you must reset your device list before adding new devices. If so click Get Started and follow the prompts. Otherwise, continue.
- At the upper right, click on the + button.
- Under Register Device, name it and paste the device identifier.
- Click Continue then Register.
Your iPhone is ready for you to run your own apps!
For any existing apps, you will now have to make sure the correct Team is selected so you can preview on your iPhone. To do that:
- Open any app you have created (Hello World, or Dice, for example).
- Click on its name at the top of the Project Navigator.
Under General > Signing > Team select the team you created.
- Under the active scheme on the upper left
, choose the device you just plugged in instead of the iPhone 8 simulator. It should be at the top of the list.
Hit the Run button to see the app on your iPhone.
Yes!