Keychain Access Issue While Archiving App in Xcode 14.2: 'codesign wants to access key' Error

Hi,

I would like to describe an issue I've encountered in my current development setup.

I'm working on an iOS mobile app using Xcode 14.2 on my personal Mac associated with the Apple ID: @#$%.com. The app is intended for distribution through a different Apple ID: +_)(.com, and it's connected to the team "Billy Bob."

Here are some key details about my setup:

  • Bundle Identifier: com.#######.#### (matching the app ID)
  • Certificate: Apple Development: Billy Bob (qwertyuiop)
  • Capabilities: In-App Purchases, Keychain Sharing, Sign-in with Apple
  • Entitlements: Includes application-identifier, keychain-access-groups, get-task-allow, com.apple.developer.team-identifier
  • Signing Certificate: Apple Development: Billy Bob (qwertyuiop)

Until recently, I was able to successfully Archive and distribute the app through TestFlight. However, when I attempted to Archive the app recently, a pop-up appeared with the following message: "codesign wants to access key 'Apple Development: Billy Bob (Billy Bob)' in your keychain To allow this, enter the 'login' keychain password. 'Always Allow' 'Deny' 'Allow'"

I have tried my Mac password, the Apple ID password for@#$%.com, and the Apple ID password for +_)(.com. Unfortunately, none of these passwords seem to work.

Upon inspecting Keychain Access, I observed that under 'My Certificates,' I have the 'Apple Development: Billy Bob (qwertyuiop)' certificate. To address this issue, I modified the 'Access Control' settings to 'Allow all applications to access this item.' Consequently, I now have two instances of the 'Apple Development: Billy Bob (qwertyuiop)' certificate – one with unrestricted access and the other with 'Confirm before allowing access.'

Under the 'Certificates' section, I see the following entries:

  • Apple Development: Billy Bob (qwertyuiop) (similar to the entry under 'My Certificates')
  • Apple Development: Billy Bob (qwertyuiop) (similar to the entry under 'My Certificates')
  • Apple Worldwide Developer Relations Certification Authority
  • Developer ID Certification Authority
  • Developer ID Certification Authority

I’m stuck and hope someone has some advice on how to move forward.

Thanks,

I have tried my Mac password

The password of your login keychain should be in sync with the password for your local account on your Mac. Try this:

  1. Log out using Apple > Log Out.

  2. Log back in.

  3. Run Keychain Access.

  4. On the left you’ll see an entry for your login keychain. Is it locked or unlocked?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Keychain Access Issue While Archiving App in Xcode 14.2: 'codesign wants to access key' Error
 
 
Q