3
votes

I have a project that runs fine in the simulator. When I attempt to run on a device I get the following alert:

App installation failed

This application’s bundle identifier does not match its code signing identifier.

I tried the various suggestions from posts uncovered by searching on the above message text. All to no avail.

Question: How do I reveal the values that aren't matching? I know what value I'm using for the Bundle Identifier. How do I reveal the value for the Code Signing Identifier? (I know the Code Signing Identity). Exactly what values is Xcode attempting to match and how are they established?

A bit more info:

I'm using Xcode's Automatically managing signing setting. I've set the Team. The info disclosure button next to Xcode Managed Profile reveals a popover with six entrees, all which appear OK, including the first entry that the App ID matches the Bundle ID.

I've also tried various manual attempts.

UPDATE

I attempted a "start from scratch" process as outlined here:

Phase 1 - Cleanup

Xcode:

  • Remove all provisioning profiles from device
  • Clean project
  • Close project
  • Quit Xcode

KeyChain:

  • Remove iPhone Developer certificate
  • Do not remove any login keys since there are many keys with the same name and I can't distiguish between them

Apple Dev site:

  • Remove all iOS Certificates
  • Remove all Development profiles
  • Do not remove any devices

MBP:

  • Remove all provisioning profiles from ~/Library/MobileDevice/Provisioning\ Profiles
  • Remove all project dirs from /Library/Developer/Xcode/DerivedData
  • Reboot

Phase 2 - Build Project

Xcode:

  • Launch and open project
  • General->Signing->Status reports: Your account already has a signing certificate for this machine but it is not present in your keychain. To create a new one, you must first revoke the existing certificate.
  • Click Revoke button.
    • Certificate is auto-generated
  • Build (success)
  • Inspect build log to verify the SHA1 used for codesigning steps matches Keychain SHA1 of auto-generated certificate

KeyChain:

  • Verify that auto-generated certificate exists in KeyChain

MBP:

  • Verify an auto-generated provisioning profile has been added to ~/Library/MobileDevice/Provisioning\ Profiles
  • Verify device UUID is include in auto-generated provisioning profile

Apple Dev site:

  • Verify auto-generated iOS Development certificate exists
  • The auto-generated provisioning profile is not listed (no profiles exists)

Phase 3 - Run Project

Xcode:

  • Run in simulator (success)
  • Run on device

    App installation failed

    This application’s bundle identifier does not match its code signing identifier.

3

3 Answers

0
votes

I think you need to check is your project bundle id's matching in

That might be an issue.

Let me know if it's helps.

0
votes

I had a similar problem when I was trying to package a cross-compiled dylib as a framework. Looking into the device log I was able to get a more detailed description

codeSigningInfoByValidatingResources:performingOnlineAuthorization:ignoringCachedSigningInfo:checkingTrustCacheIfApplicable:error:]: 817: Code signing identifier (DYLIB_NAME) does not match bundle identifier (BUNDLE_IDENTIFIER)

My solution was to adjust the DYLIB_NAME to match the BUNDLE_IDENTIFIER. However, there was a catch: Somehow, XCode seems to be able to extract the original build-name of the dylib. Simply renaming the file thus did not help: I had to adjust the build-target of the dylib to make this solution work.

0
votes

in iTunes they changed it to have a flag for each role if he will have Access to Certificates, Identifiers & Profiles. and by default its false.

All i had to do is to:

go to iTunesConnect -> Users and Access -> edit my role by checking the box of "Access to Certificates, Identifiers & Profiles"

enter image description here