Code Sign error: The identity 'iPhone Developer: x Xxxxx' doesn't match any identity in any profile
Solution 1:
- Right Click the Project (eg. x.xcodeproject) and select Show Package Content
- Open project.pbxproj with TextEdit
- Search for all "CODE_SIGN_IDENTITY[sdk=iphoneos*]" and set it to "CODE_SIGN_IDENTITY[sdk=iphonesos*]" = "iPhone Developer";
- Search for "PROVISIONING_PROFILE[sdk=iphoneos*]" and set it to "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
- Save the file
- Reopen the Xcode project or select "Read from Disk" resulting from Xcode the prompt.
- This Worked for me. I hope it works for you too.
Solution 2:
I think you need to create new provisioning profiles based on your new certificate.
Log on to developer.apple.com and go to the iOS Provisioning Portal -> Provisioning -> Development. Most likely, the profile you once created has expired, so just renew and redownload it.
Solution 3:
Following kw4m3n4's answer, I found the special characters (umlaute) in my name where messed up in the file. I fixed it like this:
- right click the .xproject file (e.g. yourproject.xproject) and select Show Package Content
- open project.pbxproj with textEdit
- search and replace the messed up name / umlauts (e.g. "Tim B√ºthe" -> "Tim Büthe")
Solution 4:
If you have multiple developer accounts, then make sure you're signed into the right one in xCode- that was the problem when I had this error.
Solution 5:
For me the problem was that I did choose debug on device by accident, as I inteded to switch to iPhone simulator. To debug on an emulator it worked as before by selecting simulator in the menu.