rettiseert
rettiseert

Reputation: 149

Error adding Apple Developer Account: authentication service is unavailable

I’m trying to add an apple developer account to VS 2019 Community ver. 16.9.2 for Windows.

Once I set the Apple ID and Password and click on Login, I get the following message: “There was an error while trying to log in: Authentication service is unavailable.”

Authentication service is unavailable

The Apple ID and Passwords are correct, in fact, if I type in the wrong credentials then Visual Studio complains about invalid id/password combination.

I disabled the firewall during the process so this should not be a connection issue.

Also, I made sure I have no pending agreements on Apple Store Connect. My apple developer account is valid and has no issues. In fact, I can use the same account on xcode just fine.

Is there some workaround?

Upvotes: 8

Views: 5546

Answers (3)

Michael
Michael

Reputation: 1107

THIS ISSUE IS FIXED IN THE 16.9.6 VISUAL STUDIO UPDATE !!!


(old workarounds) There are some workarounds but none of them worked for me and updating to the latest version didn't help either (Visual Studio 2019 16.9.4). For as far as I know this issue persists even on version 16.7.5 of VS2019. For some people the workarounds seem to work so I will list them here so hopefully some of us can get on with our projects.

Workaround 1 (offered by Xamarin team):

  • Close Visual Studio 2019
  • Delete the following folder %LOCALAPPDATA%\Temp\Xamarin\XMA
  • Open project -> clean sollution
  • Set Automatic for bundle signing in the iOS project settings
  • Rebuild (- if it doesn't work try again after restarting pc)

Workaround 2:

  • Delete your apple account from VS2019 through Tools–> Options --> Xamarin–> Apple Accounts
  • Sign back in again
  • Download your provisioning profile from developer.apple.com account to you pc
  • Copy and paste it into: \Users\YOUR_USERACCOUNT\AppData\Local\Xamarin\iOS\Provisioning\Profiles
  • If it doesn't work, perform in combination with workaround 1

Workaround 3:

  • Delete apple account from VS
  • Remove certificates from AppData\Local\Xamarin\iOS\Provisioning\Certificates
  • Remove profiles from AppData\Local\Xamarin\iOS\Provisioning\Profiles
  • Add Apple account
  • Set to Automatic Provisioning and select team, it will error again but will reinstall the certificates
  • Manually download provisioning profile and copy it to - AppData\Local\Xamarin\iOS\Provisioning\Profiles
  • Run the archiving process should error out again but the “id” or name of the provisioning will be displayed in the error
  • Rename the provisioning file to match and rerun archiving.

As I said these workarounds don't work for me but I hope they do for you. If it doesn't then you're in the same boat as me and you're going to need to follow this thread: https://developercommunity.visualstudio.com/t/Error-adding-Apple-Developer-Account:-au/1380749?viewtype=all

Upvotes: 4

TheRedDwarf
TheRedDwarf

Reputation: 183

I just went through the exact same problem and it took forever to work out. I'd had my app running locally and debugging on my iphone just fine. A few months later this bug popped up... I needed to simply update iTunes. iTunes handles the handshake stuff for your iOs devices and Windows.

Upvotes: 0

George
George

Reputation: 2594

I was able to use a combination of several workarounds from Michael's answer to get the app signed and deployed on an iPhone (for debugging). Here are the steps in correct order that worked for me:

  • Set Automatic for bundle signing in the iOS project settings

  • Delete your apple account from VS2019 through Tools–> Options --> Xamarin–> Apple Accounts

  • Close Visual Studio 2019

  • Delete the following folder %LOCALAPPDATA%\Temp\Xamarin\XMA

  • Delete all "obj", "bin" and ".vs" folders for the solution

  • Download your provisioning profile from developer.apple.com account to you PC and save it to %LOCALAPPDATA%\Xamarin\iOS\Provisioning\Profiles

  • Open Visual Studio 2019

  • Add your apple account from VS2019 through Tools–> Options --> Xamarin–> Apple Accounts

  • Build. It will error out while signing the app.

  • Look at the error. It should specify the expected file name for your provisioning profile. The file name is a long string of hex digits with extension ".mobileprovision".

  • Go to %LOCALAPPDATA%\Xamarin\iOS\Provisioning\Profiles and rename your provisioning profile file into file name from the error message.

  • Build again. It should work now!

Upvotes: 0

Related Questions