Search code examples
iosiphonexcodecode-signingkeychain

Code sign wants to sign using key in your keychain


I want to generate my build so that I have started following steps as like, I was doing from last few years. But this time following dialog box come in front of me while I try to export the build:

enter image description here

I have used Google for solution of this problem and tried multiple given suggestions but still I can't able to sort out this problem.

Here is the main reference that I found on stackoverflow: code sign wants to sign using key - Doesn't allow or always allow but deny works

But those reply not working for me so please share your suggestion with me.


Solution

  • There may be something funny with the Trust setting in the certificate.

    1. Open Keychain.
    2. Find the relevant certificate in "My Certificates". Verify it hasn't expired.
    3. Double click to open.
    4. Doof with the When using this certificate field. Setting it to Always Trust before building might help. You can flip it back to Use System defaults after.
    5. Also check the settings on the Code Signing specific field. That might be wrong.

    enter image description here

    This might have happened if you pressed "Deny" at some point in the past.