Question

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:

  • Building for development, not release.
  • Building for 3.1.2
  • Running SDK 3.1.2

I have:

  • Revoked and re-issued a valid certificate
  • Created a new Ap ID and new associated provisioning profile with an explicit app name (com.mycompany.appname) and matched my Bundle Identifier to it (com.mycompany.appname).
  • Selected the specific provisioning profile I created as my Code Signing Identity. (I uninstalled all my other CSI just in case.) Just to reiterate: "iPhone Distribution" is not selected!

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...

Was it helpful?

Solution 3

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.

OTHER TIPS

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top