I cannot seem to be able to archive an app on a new computer. I created new provisioning profiles for distribution and development. I created a new Certificate Signing Req
Given up on all of the above. The only thing that worked for me was:
On step 7, xcode requested access to keychain (which it did not do in other solutions stated above), once granted - it worked.
Same for step 8.
Not sure what was going on (my certs and profiles were only 3 months old), and I admit this was a 'brute force' method - but it worked.
Good luck.
Deleting the DerivedData for the project worked for me:
rm -rf ~/Library/Developer/Xcode/DerivedData/AppName
This is a known issue of Xcode 7.1. In my case, recreating the profile was the only successful workaround
I opened project.pbxproj with text editor and searched for UUID and delete the line like this PROVISIONING_PROFILE = "UUID";
I know its too late to put an answer here but this question comes up at the top after searching this issue. I managed to solve this by selecting the project and in Build settings
changed the UUID
options to what I wanted.