XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.68k stars 126 forks source link

Change the Apple ID Associated with Xcodes #169

Closed AndyIbanez closed 2 years ago

AndyIbanez commented 2 years ago

Hey all,

Sorry for making an issue for this, but I can't figure out how to change my Apple ID. I recently changed the email linked to my Apple ID and I'm trying to use Install some Xcode versions, but I can't do that unless I login. The prompt only shows me the old Apple ID. I checked the keychain to see if there were any entries where the tool was grabbing it from but I found nothing. Typing xcodes as a solo command doesn't give me anything I could use for this.

The documentation mentions a xcodes signout command, but it doesn't appear to be implemented yet (despite the source code saying otherwise, the error I'm getting is Error: Unexpected argument 'signout'). I'm running version 0.17.0

How can I change the Apple ID that Xcodes is using?

MattKiazyk commented 2 years ago

Hi @AndyIbanez

Can you update xcodes? Just released a version today that has that signout command. That should help you sign out fully.

If not, let me know.

Thanks

AndyIbanez commented 2 years ago

@MattKiazyk the command is there now, but when I login it still prompts for the same Apple ID I just logged out from.

EDIT: Or maybe not. Where does tool grab the Apple ID to display it next to the "Apple ID Password" password? Based on what I saw it should be the keychain but I have no clue where exactly from.

MattKiazyk commented 2 years ago

Hey @AndyIbanez sorry about your troubles

If you called the signout command and it's skipping theApple ID prompt

image

Then that will be loading the username from XCODES_USERNAME Environment variable. After a signout it should prompt for a new apple id first unless the environment variable is there (or there's a bug somewhere)

AndyIbanez commented 2 years ago

Ahh gotcha, I forgot I set a temporary env variable for XCODE_USER as a workaround to not being able to sign out before 0.18.0.

My mistake. Sorry about that!