Can't sign in to Xcode 11 with Apple ID

I am having an issue with Xcode 11 that I can't sign in with my apple id. I get the error 'Your session has expired. Please log in. Try signing in again or contact Apple Developer Support to resolve account access issues.'

It seams that is is an issue generally with Xcode 11 as I have tried 11.3, 11.4, and 11.5 and it still has the same issue.

I have checked that two factor is activated and it is. I have also tried my brothers account and it doesn't work either.

My main issue is it works fine with Xcode 12 beta 3 which properly asks for the two factor pin. I developed an app with Xcode 12 beta and need to go build it with Xcode 11 for release and can't.


Replies

There’s a more active thread about it here. Please comment and upvote so that it hopefully be more visible: https://developer.apple.com/forums/thread/656161

Perhaps over there you can also share how you made it work on Xcode 12 because we all have issue making it work on either version.
I'm having the same issue, did this ever get resolved? How?
Did you ever resolve this @wired14?

anyone has solved this problem ?
@wired14 have you or anyone else figured this out? I'm unable to add any iCloud accounts to Xcode even though I can log in just fine on the web
whenever I use Xcode on the respective macOS everything works fine (Xcode: 10 on Mojave / 11 on Catalina / 12 on BiSur). The same is not true for me with Xcode 11 on BigSur.
I managed to solve the problem as follows:
  • From an operational Xcode, I exported "Apple ID and Signing Assets..." in Xcode/preferences/accounts.

  • In my Xcode with problems I imported the file. Although the error remains at least now my account appears.

  • I installed Xcode 12 because that is what is supposed to work with BigSur. I logged into my account. I installed my Provisioning Profile and sent one of my apps to one of my devices.

  • I closed Xcode 12. I opened Xcode 11 and although the same login issue comes up, I can choose and use my Provisioning Profile.

  • pure joy

This process worked for me.

If you don't have XCode installed, you can download it from Apple Developer or the App Store. I had to do the Clover-Space, type xcode (Which pulled up XCode-Beta), and press Clover-Enter to open the file location. I found that my XCode was still in the "Downloads" folder. So I drag/dropped it onto the Applications folder, then I ran: Download Xcode or move it to your Applications folder. Then, open terminal and run both of these commands. One after the other.  sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer

sudo xcodebuild -license Then space-down to the bottom and type "agree"

This process worked for me.

If you don't have XCode installed, you can download it from Apple Developer or the App Store. I had to do the Clover-Space, type xcode (Which pulled up XCode-Beta), and press Clover-Enter to open the file location. I found that my XCode was still in the "Downloads" folder. So I drag/dropped it onto the Applications folder, then I ran: Download Xcode or move it to your Applications folder. Then, open terminal and run both of these commands. One after the other.  sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer

sudo xcodebuild -license Then space-down to the bottom and type "agree"