When I develop iOS app use Xcode and build my iOS app, I suddenly meet an error which said failed to create provisioning profile. there are no devices registered in your account on the developer website. Plug in and select a device to have XCode register it. This error confused me a lot of times. After some time of investigation, I finally find the solution to fix it.
1. Where To Find The Failed To Create Provisioning Profile Error Message.
- You can find this error message by click the Xcode project ( TestProject ) on the Xcode editor left project list panel.
- Then click one of the TARGETS ( TestProject ) on the XCode center editor.
- Then click the General tab on the top area of the selected target detail pane.
- Then you can see the error message in the Signing area —> Status section.
2. Why Failed To Create Provisioning Profile.
- The reason for this error is because I just upgrade my Xcode to version 10.3. And after the upgrade, all the iOS simulators which I used before have been lost. So when I build my iOS app in Xcode, it uses the real iOS device, but I do not have such real iOS device connected to my Mac computer.
- You can see this when you click the Set the active scheme drop-down menu item list after the Run button at the project top toolbar, you will find there is no iOS simulator, just Generic iOS Device is checked.
3. How To Fix Xcode Failed To Create Provisioning Profile Error.
- To fix this error is very easy, just connect your real iOS device such as iPhone to the Mac computer with a USB line, follow the popup screen on the iPhone, then you can select your iOS device in the Set the active scheme drop down list.
- Now go to your Xcode project ( TestProject ) —> target ( TestProject ) —> General tab —> Signing area, you will find the error message disappear.