Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DVTDeveloperAccountManager: Failed to load credentials for <old apple ID>

I have switched to a new Apple ID for development. I'm trying to build my app- via Fastlane, but here is the command I'm running plain from the Terminal:

xcodebuild -workspace Runner.xcworkspace -scheme Runner -destination 'generic/platform=iOS' -archivePath ~/Desktop/test.xcarchive archive

It shows this error:

2024-11-17 16:53:42.620 xcodebuild[3907:31401]  DVTDeveloperAccountManager: Failed to load credentials for [email protected]: Error Domain=DVTDeveloperAccountCredentialsError Code=0 "Invalid credentials in keychain for [email protected], missing Xcode-Token" UserInfo={NSLocalizedDescription=Invalid credentials in keychain for [email protected], missing Xcode-Token}

The problem is that [email protected] is the old Apple ID which I have tried to remove from my system entirely:

  • Logged out of the user in System Settings > Apple ID and logged into my new Apple ID
  • Opened Keychain Access, deleted all items returned in a search for my old Apple ID
  • Uninstalled XCode, reinstalled it. Opened XCode preferences -> Account and removed my old Apple ID, added the new one
  • Tried generating a certificate signing request
  • Deleted the entire project and cloned it clean from the repository
  • xcodebuild clean
  • rm -rf ~/Library/Developer/Xcode/DerivedData
  • rm -rf ~/Library/Caches/com.apple.dt.Xcode
  • rm -rf ~/Library/Application\ Support/Xcode
  • rm -rf ~/Library/MobileDevice/Provisioning\ Profiles
  • fastlane match nuke development and fastlane match nuke distribution followed by fastlane match to regenerate -- all those logs confirmed use of the new Apple ID
  • security delete-generic-password -s "Xcode" -a "[email protected]"
  • Rebooted

Why else would my machine be looking up credentials for my old Apple ID??

like image 299
Charney Kaye Avatar asked Mar 03 '26 04:03

Charney Kaye


1 Answers

This was the solution:

defaults delete com.apple.dt.Xcode
like image 158
Charney Kaye Avatar answered Mar 05 '26 18:03

Charney Kaye