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).
- Plug your iOS device into your Mac using a lightning cable.
- Unlock your phone and click "trust" if prompted.
- 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 Targetin the project settings).
- Click the
Runbutton 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.
- Let Xcode fix this issue for you by logging in with your
iCloudaccount. This is the same you use to download apps in the App Store. If you do not have an
Apple IDXcode will let you create one, and follow the onscreen steps in order to do so.
- Click the
Runbutton 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.
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.
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!
If you have feedback on this tutorial or find any mistakes, please open issues on the GitHub Repository.