Search code examples
iphoneobjective-ccocoa-touchxcode4

Code Sign error with Xcode 4.2


I am getting this error;

Code Sign error: Provisioning profile '98745F54-634Y-882B-A56T-5EFE760C3EE6' can't be found

I googled and found out that I have to remove this line from project.pbxproj. When I searched for Provisioning profile I get 6 hits. I need to know which line of Provisioning profile I should delete?

note: my xcode version 4.2

I went through a SO question, which shows a sequence of lines as in which line to edit, but I can't find that sequence in my project.pbxproj.

1.)

            PROVISIONING_PROFILE = "CC34F5T6-5765-465R-8VB9-FF98766D17H7";
            "PROVISIONING_PROFILE[sdk=iphoneos*]" = "DF98RRED-DE88-0986-869B-037B6345E664";
            SDKROOT = iphoneos;

2.)

OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
                PROVISIONING_PROFILE = "CC34F5T6-5765-465R-8VB9-FF98766D17H7";
                "PROVISIONING_PROFILE[sdk=iphoneos*]" = "DF98RRED-DE88-0986-869B-037B6345E664";
                SDKROOT = iphoneos;

3.)

            PRODUCT_NAME = "$(TARGET_NAME)";
            PROVISIONING_PROFILE = "98745F54-634Y-882B-A56T-5EFE760C3EE6";
            WRAPPER_EXTENSION = app;

4.)

            PRODUCT_NAME = "$(TARGET_NAME)";
            PROVISIONING_PROFILE = "98745F54-634Y-882B-A56T-5EFE760C3EE6";
            WRAPPER_EXTENSION = app;

Solution

  • According to my knowledge you should not touch project.pbxproj file directly. Your error happended because you try to sign the application with a provioning profile that is not exist on your machine. Please do the following:

    1. Go to Apple Developer Portal and make sure you have a valid provisioning profile.
    2. in Xcode go to Build Settings -> Code Signing -> Code Signing Identity
    3. make sure that you sign the application with a valid provisioning profile from step 1.
    4. make sure the Scheme you use (Debug, Release) is signed correctly.
    5. Clean the project
    6. Build and Run