EToreo
EToreo

Reputation: 3086

iPhone SDK Code Sign Error

I am getting this error when I try to build for the device:

Code Sign error: The identity 'iPhone Distribution' doesn't match any identity in any profile

I am:

I have:

I should also stipulate that it won't even begin to build the code (even if there has been a clean build) because of this problem. So its not throwing this error when it tries to install to the device.

I have also read other StackOverflow threads about this issue, but they seem to be building for distribution and not development.

Any help would be much appreciated...

Upvotes: 0

Views: 3074

Answers (3)

Perry Loh
Perry Loh

Reputation: 36

Never really found a solution posted by somebody else so I'm sharing what I did to fix this problem below.

What I did was show the package contents of the '.xcodeproj', and then manually edit the 'project.pbxproj' file in there.

Look for a section called 'XCBuildConfiguration' and you should be able to see all the different configurations. I manually removed the ones related to code signing such as:

CODE_SIGN_ENTITLEMENTS = dist.plist;
CODE_SIGN_IDENTITY = "iPhone Distribution: xxxx yyyy";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: xxxx yyyy";
PROVISIONING_PROFILE = "zzzzzzzzzzzzzzzzzzzzzzzz";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "zzzzzzzzzzzzzzzzzzzzzzzz";

So what was left was the following:

buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                COPY_PHASE_STRIP = NO;
                GCC_DYNAMIC_NO_PIC = NO;
                GCC_OPTIMIZATION_LEVEL = 0;
                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                GCC_PREFIX_HEADER = xxx_Prefix.pch;
                INFOPLIST_FILE = "Info.plist";
                PRODUCT_NAME = xxx;
            };

You should remove for the other configurations as well, if there are any related to code signing

Upvotes: 1

EToreo
EToreo

Reputation: 3086

I tried everything over the course of days and finally got it in my head to just make a new project and add back in all my source files. It seemed like a long shot at the time, but it seems to have worked. No idea why, but everything is running smoothly now.

Upvotes: 0

Adam Wright
Adam Wright

Reputation: 49376

Are you sure you've not installed 3.1.2 and not updated your SDK (or vice versa)? The minor version number is important, and mismatches can lead to this error.

Upvotes: 1

Related Questions