I have been working the whole day to try to build my app on my device.
I get this error when I try to build on my device.
I have been reading about this prob
Here's how I did it.
Enjoy!
In my case it was because the xcode 4.0.2 prevented deletion of stale data in the project.pbxpro in the *.xcodepro directory. I ended up hand editing the file after shutting down xcode. In the file I looked for all of the occurrences of "PROVISIONING", something like this:
PRODUCT_NAME = Xyzzy;
PROVISIONING_PROFILE = "CF5F0AEA-92D9-48E1-99DF-301AB36C2BFB";
"PROVISIONING_PROFILE[sdk=*]" = "CF5F0AEA-92D9-48E1-99DF-301AB36C2BFB";
SDKROOT = iphoneos;
and changed it to:
PRODUCT_NAME = Xyzzy;
"PROVISIONING_PROFILE[sdk=*]" = "";
SDKROOT = iphoneos;
I restarted xcode and the build succeeded with out issue. A word of caution make sure that you back up the project directory before make changes to the project files, and only hand edit the files when you have no other options.
I had the provisioning profile set to one thing in Projects and another in Targets. Do a search in your project for the file that is missing and see if it pops up. No hand editing needed!
I just redid my provisioning profile and re-added devices to the portal in Organizer. Then I clicked my project icon, entered Build Settings, Code Signing and remapped to the new provisioning profile.
Like @Jonathan, I just restarted Xcode and it worked after it automatically retrieved the profile from my Apple developer account. This was Xcode 6.2
I went and changed code signing identity the on project and target to "Don't Code Sign" and then changed back to the correct code signing identity. That fixed it for me.