简体   繁体   中英

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;

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

I have heard directly editing that file has dangerous consequences, but I had to do it once for the same reason.

To find out which profile is valid, go in to the Organizer (WINDOW--> ORGANIZER) and select the valid provisioning profiles. When you select the profile, it shows up on top with PROFILE IDENTIFIER which is the code you are looking for.

On Build Settings search for code signing . You will find it.

According to highest ranking answer of your linked question you should remove all references to the old/invalid profile. You don't need to be affraid to manually edit project.pbxproj. Just don't forget two things to do first:

  • backup your existing file
  • shut down xcode before editing

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM