Search code examples
ioscertificate

Unable to Code sign iOS application due to duplicate distribution certificates with different private keys


We have two iOS Distribution certificates for Project A and Project B. I´m having some issues with signing because both distribution certificates have the same name but with different keys.

If I add both certificates and try to sign with one of them for Project A I get an error message that says below.

Code Signing Error: Provisioning profile “NTT One Dev" doesn't include signing certificate "iPhone Distribution: NTT LLP". Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2' Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'

For Project B I can sign the app without issues even if I had two distribution certificates with same name. I have to remove the newly added certificate from Keychain access to sign the app for Project A. This makes signing an application a time consuming task as I have to export/import certificates every time I want build apps.

Does anyone know of a way of changing the name of the Distribution certificate that Apple generates or how can I resolve this issue without removing certificates?

Best regards Naga


Solution

  • Issue resolved after removing the old certificate and modified the provision profile for Project A to use same certificate used by Project B.