I just had this error as well. I am not sure if all of these steps are required, but the is exactly what I did to fix it, and it worked for me...
- On the device, I removed the provisioning profile that was in General -> Profile.
- In Xcode, under window tab open up the "Devices" window. (shift+cmd+2)
- Choose the device and copy its identifier
- Login to developer.apple.com and go to the "Certificates, Identifiers & Profiles" area
- If the device in question is not registered, register it in the "Devices" area. (My device was not registered, so I registered it)
- In Xcode preferences under Xcode tab, go to the Accounts tab and choose your Apple ID.
- Choose the identity from the list and then hit the "View Details..." button.
- Under "Signing Identities", only "iOS Development" was listed.
- Click the "refresh" button on the lower-left of this details page.
- I was informed that I didn't have a distribution certificate and asked if I wanted Xcode to request one for me. I chose Yes (or Request)
- 'iOS Distribution" then showed up also, just under the "iOS Development" entry
- Hit the "Done" button
- Exit from the Xcode preferences
- Choose the Target for your project, then choose the "General" tab
- Choose the "Team" dropdown and pick your team, even if it is already selected. This causes Xcode to refresh its info about the Team.
At this point, my warning next to "Team" went away. I then tried to run my app on the problem iOS device again and it worked as expected.
I hope that by following these steps, it will at least help you get closer to fixing your problem.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…