How to Remove Session Expired Apple ID in Xcode? or Getting 'Session Expired' for Apple ID in Xcode –

22 Replies, 1091 Views

"Getting 'Session Expired' for Apple ID in Xcode – How to Remove It?"

Hey guys,

Sooo Xcode keeps throwing this annoying "Session Expired" error for my Apple ID. Tried signing out/in, restarting, nada.

Anyone know how to *properly* remove session expired apple id in xcode? It’s driving me nuts lol.

I saw some old threads but they’re kinda outdated. Is there a new fix or something?

Also, does clearing cache help? Or do I gotta dig into keychain?

Thanks in advance! 🙏

(Ps. Using Xcode 15 if that matters)
Ugh, I had the same issue last week! To remove session expired apple id in xcode, I had to nuke the keychain entries.

Go to Keychain Access > search for "Xcode" and "Apple ID" > delete all related entries.

Then restart Xcode and sign in again. Worked for me!

Also, make sure your macOS and Xcode are up to date.
Hey! Clearing cache *might* help, but the real fix is usually deeper.

Try this:
1. Quit Xcode
2. Open Terminal and run `defaults delete com.apple.dt.Xcode`
3. Restart Xcode and sign in fresh

This resets Xcode prefs and often fixes the session expired error.
Bro, just had this yesterday. The keychain thing is hit or miss.

What worked for me was removing the session expired apple id in xcode by:
- Signing out of Xcode
- Deleting ~/Library/Developer/Xcode/ folder
- Reinstalling Xcode (yeah, overkill but it worked)

Painful, but better than endless errors.
If you're getting "session expired" in Xcode 15, try this first:

Go to Xcode > Preferences > Accounts > Click the "-" to remove your Apple ID.

Then quit Xcode, reopen, and add it back.

Sometimes it's that simple! If not, the nuclear option is keychain cleanup.
This drove me crazy too! Found a weird fix:

Instead of trying to remove session expired apple id in xcode, try creating a NEW macOS user account.

Install Xcode there and sign in. Works 90% of the time because it's a fresh environment.

Not ideal, but faster than debugging keychain hell.
Pro tip: Before you go nuclear trying to remove session expired apple id in xcode, check your system date/time!

I wasted hours before realizing my Mac's clock was off by 2 minutes.

Fix:
1. Open Date & Time preferences
2. Enable "Set date and time automatically"
3. Restart Xcode
For me, the issue was two-factor auth being weird.

Try this:
1. Go to appleid.apple.com
2. Revoke ALL "trusted devices"
3. Sign back into Xcode with 2FA

This forces a fresh session. Worked when nothing else did!
Thanks everyone for the suggestions!

Tried the keychain method first - didn't work. Then did the defaults delete command and BAM, fixed!

Weird that something so simple worked after hours of frustration.

Quick q: Should I worry about any side effects from resetting defaults? My projects seem fine but just checking.

Also, big thanks for the Apple forum link - bookmarking that for next time!
Xcode 15 has been buggy with sessions. Try this:

1. Delete ~/Library/Caches/com.apple.dt.Xcode
2. Delete ~/Library/Preferences/com.apple.dt.Xcode.plist
3. Reboot

This clears corrupted cache files that might cause the session expired error.



Users browsing this thread: 1 Guest(s)