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 time. After some time investigation, i finally find the solution to fix it.
You can find this error message in the Xcode project ( TestProject ) —> one of the TARGETS ( TestProject ) —> General tab —> Signing area —> Status section.
1. Why Failed To Create Provisioning Profile.
The reason for this error is because i just upgrade my Xcode to version 10.3. And after upgrade, all the iOS simulator which i used before has been lost. So when i build my iOS app in Xcode, it use 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 tool bar, you will find there are no iOS simulator, just Generic iOS Device is checked.
2. 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.