Local XCode Apple ID not updating after changing Apple ID email

Hello,

I have multiple iOS applications using Xcode projects built with Flutter. Originally I created this applications with my Apple ID, however, since then I lost access to my Apple ID's email. I updated my Apple ID email to a new email and now I cannot even build an app locally for the iOS Simulator. I'm on macOS 15 / iOS 18 simulator.

Here is the output from xcodebuild:

DVTDeveloperAccountManager: Failed to load credentials for [OLD_EMAIL]: Error Domain=DVTDeveloperAccountCredentialsError Code=0 "Invalid credentials in keychain for [OLD_EMAIL], missing Xcode-Token" UserInfo={NSLocalizedDescription=Invalid credentials in keychain for [OLD_EMAIL], missing Xcode-Token}

Where OLD_EMAIL is the old Apple ID email. When I go into my Keychain Access app, I remove all references to my old email, but they regenerate when trying to build the app. I've tried doing manually signing on the xcode project config, but that gives the same error as well.

This is only on old projects. When I run a new project, I do not have any errors building or uploading to App Store Connect.

Any help would be greatly appreciated. Thank you

Did you check in Xcode's Settings if you are logged in with the right Apple ID?

I have the same problem, also persists after reinstalling Xcode and dev tools. Xcode keeps adding old account even though I do not have it logged in anywhere

Same here....!

Same issue.

Same :/

I have the same issue

Local XCode Apple ID not updating after changing Apple ID email
 
 
Q