7

I have just upgraded my iPhone to the 4S and having restored all of the settings from my old phone I found that three of my apps were missing. I went to the Apple Dev centre and deleted my old phone and then rebuilt and downloaded the profiles with my new phone added. I removed all of the old profiles and copied the newly created ones across. The problem now is that in two of my projects, when I try to build I get an error -

[BEROR]Code Sign error: Provisioning profile '8A69C027-B06A-4A32-ABDA-855990018CA1' can't be found

I have gone into the Build Settings>Code Signing Identity>Debug and selected the correct profile and I've checked in Organizer that the profile exists in both the library and against my phone which has a green light next to it. What am I missing?

beryllium
  • 29,669
  • 15
  • 106
  • 125
user616076
  • 3,907
  • 8
  • 38
  • 64

1 Answers1

10

Open project.pbxproj file in the Textedit app, remove lines with this text 8A69C027-B06A-4A32-ABDA-855990018CA1

These lines should look like this:

PROVISIONING_PROFILE = "8A69C027-B06A-4A32-ABDA-855990018CA1";

Reload Xcode.

ps. don't forget to backup your project!

ecreif
  • 1,182
  • 1
  • 12
  • 25
beryllium
  • 29,669
  • 15
  • 106
  • 125
  • 3
    It can be done within xcode too. Check and reassign the `Code Sign Identity` in `Build Settings` for both the `Project` and `Target`. – ott-- Jan 16 '12 at 10:55
  • Yes... and if they look right and it still doesn't work, first change them to "Do Not Sign", and then change them back again. – Danyal Aytekin Jan 16 '12 at 11:13
  • Thanks for the reply. I only have a project file with the extension xcodeproj, is that the correct one? – user616076 Jan 16 '12 at 11:56
  • It's a some kind of folder. Right click on this file in the Finder window, choose Show Package content – beryllium Jan 16 '12 at 12:11
  • 2
    Worked for me after deleting the line manually via text edit. Setting it to "do not sign" did not work. – Stiefel Nov 25 '12 at 22:18
  • I set the code signing identity only in the Project but not the target -- setting it to the new profile in the target as well did the trick for me – Souleiman Aug 19 '13 at 13:58
  • I had a similar issue when upgrading to xcode 7 and renewing expired certificates. Ended up with all new certificates and provisioning profiles but xcode complained when building that it couldn't find the profile (even though it was there in the Library>MobileDevice>Provisioning Profiles folder. Removing these lines from the pbxproj file fixed it. – user206481 Nov 13 '15 at 23:21