How to test your Xcode app on your iPhone
Are you building an app in Xcode 12 and do you want to know how to run Xcode on your iPhone? Then, stay with me in this brief tutorial.
1. Create a new iOS app (optional)
If you have already started to build an app, skip this first step, otherwise, open Xcode and create a new App for iOS:
2. Try to run the app in your iPhone…
Go and click the icon of your current simulator…
… connect your iPhone to your Mac and select it from the list
Right now, if you hit the run button you will see an error in red telling you that a development team is necessary:
3. The fix: Add a Team account
In the left panel, choose your app and then the tab called Signing & Capabilities. Click Add Account…
Add your regular icloud e-mail and enter your password:
Don’t leave yet the Signing & Capabilities tab yet; in the Signing section, click on Team and instead of None, choose your recently added Apple ID account:
4. Run the app on your iPhone
That’s it, if you run it again, you should not receive any problem. Go now to your iPhone, you will see there your app. If you tap on it, probably a message will appear warning about an Untrusted Developer:
Go to Settings > General > Device Management, and Trust the developer:
And that’s it! This is how to run Xcode on your iPhone! 🎉🥳
Thanks for reading 😊!
Originally published at http://irenebosque.com on June 13, 2021.