I recently signed out of my Apple ID in system preferences since I am on a beta OS.
In order to run on device I need to be signed in with Xcode. However while trying to do so it gives me the "An unknown error occurred" message. I double checked on my password and was able to sign in with it on the web. I have not changed the password in the last year.
In order to run on device I need to be signed in with Xcode. However while trying to do so it gives me the "An unknown error occurred" message. I double checked on my password and was able to sign in with it on the web. I have not changed the password in the last year.
Clean Derived Data: ~/Library/Developer/Xcode/DerivedData/ModuleCache.noindex ~/Library/Developer/Xcode/DerivedData manually
Clear Xcode Simulator: Device > Erase All Content and Settings
Try Login Again: Xcode > Preferences > Accounts > + button > choose Apple ID
Make Sure:
Your VPN and DNS is offThe check those VPN/DNS, I uncheck all of the settings in System Preferences > Network > <Chose ur Network> > Advanced > Proxies > Uncheck all of those (in my Case)Hope That Help, Cheers