When you try to deploy your app to your iPhone, you might get the following error:
Code Signing Error: “Unity-iPhone” requires a provisioning profile. Select a provisioning profile for the “Release” build configuration in the project editor.
To resolve this issue, you should create or tell Xcode to automatically create a provisioning profile to obtain the necessary permission to deploy and run an app on iPhone. This tutorial explains how to achieve that.
Note: This tutorial is for deploying and testing your app on your iPhone and has nothing to do with the appstore publishing.
- Make sure you do have an Apple Developer Account.
- Connect your iPhone to your mac computer.
- In your XCode project, select your project in the left pane (see the screenshot below).
- In the middle pane, under TARGETS, choose Unity-iPhone.
- In the tab section, select Signing & Capabilities.
- Select Automatically manage signing
- In the provisioning profile, select the item that includes your name plus (Personal Team).
- At this step, you should get a pop up on your computer. It asks you to enter your icloud password.
- Go to your iPhone. You should also get a prompt there. Click Yes.
- On your iPhone, go to Setting > General > Device Management. Click on the Apple Development: … and confirm it (if it’s not confirmed already). By doing this, iPhone allows apps from the developer (yourself) be trusted on this phone and will be trusted until all apps from the developer are deleted.
Now you can deploy your Xcode app into your iPhone.