Xcode won't recognize my new provisioning profile Xcode won't recognize my new provisioning profile xcode xcode

Xcode won't recognize my new provisioning profile


tl;dr: turns out I simply had to edit the project file manually to tell Xcode of the new profile. Now, I don't know why I had to manually update the project file. Perhaps I did something wrong during the process of importing the new profile to Xcode, so it didn't realize my new profile had come in. Or the file system choked midway and Xcode wasn't able to update itself. Oh well.

Now for the fun technical part:

IMPORTANT: As with anything else that involves modifying files you shouldn't be modifying: make sure to back up your .xcodeproj bundle and/or your entire Xcode project, or make sure your Xcode project is kept in proper version control. You don't want to mess up and cause Xcode to stop building your project onto your device, without anything to fall back on.

I peeked into the contents of my app's .xcodeproj bundle (Xcode is not running at this time). To view these, open your project folder in Finder, then Control-click on your .xcodeproj file and choose Show Package Contents:

Breeze.xcodeproj/  Daniel.mode1v3  Daniel.pbxuser  project.pbxproj

Then opened project.pbxproj in a text editor (it's text, not binary), and looked around for build configuration information.

There's a section labeled /* Begin XCBuildConfiguration section */ (which you can find using your editor's search function). It's a list of entries, each of which represents a code-signing configuration for a given profile in a given build configuration.

Here's information about the profile I use to sign my binary for development:

1D6058940D05DD3E006BFB54 /* Debug */ = {    isa = XCBuildConfiguration;    buildSettings = {        ALWAYS_SEARCH_USER_PATHS = NO;        "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Daniel Tan (XXXXXXXXXX)";        COPY_PHASE_STRIP = NO;        GCC_DYNAMIC_NO_PIC = NO;        GCC_OPTIMIZATION_LEVEL = 0;        GCC_PRECOMPILE_PREFIX_HEADER = YES;        GCC_PREFIX_HEADER = Breeze_Prefix.pch;        GCC_VERSION = com.apple.compilers.llvmgcc42;        INFOPLIST_FILE = "Breeze-Info.plist";        IPHONEOS_DEPLOYMENT_TARGET = 4.0;        PRODUCT_NAME = "Breeze";        "PROVISIONING_PROFILE[sdk=iphoneos*]" = "36F99F3E-805F-47A7-95D4-FF8324711CBE";        SDKROOT = iphoneos;    };    name = Debug;};

Of note is this line:

"PROVISIONING_PROFILE[sdk=iphoneos*]" = "36F99F3E-805F-47A7-95D4-FF8324711CBE";

That's the GUID reported by the build error; the identifier of my old, expired provisioning profile.

All I had to do was replace it with the GUID of the new profile:

"PROVISIONING_PROFILE[sdk=iphoneos*]" = "E6E6369E-FD58-4886-9C3A-72C9DAE36501";

I open my project in Xcode again, and now my app builds and installs on my devices successfully, using the new provisioning profile.


Here's how I did it in Xcode 4:

  1. Select Don't Code Sign from Project > Build Settings > Code Signing
  2. Clean the build
  3. Build it again - should show an error like "this stuff needs signing"
  4. Choose the new profile from the Code Signing
  5. Rebuild


I was able to fix this error by changing it to "Don't Code Sign" in Code Signing Identity. Build, and you get the error "code signing is required for product type ...blah...". Then go back and select the right profile. Build and all good. This happened to me because my certificate expired and I renewed it. In addition to the above I also had to remove the old certificate from my keychain, and the Organizer.