Lost the ability to run a Xamarin.Forms app to an iPhone physical device

Dimitris Mylonas 16 Reputation points
2021-04-19T09:09:09.98+00:00

The problem that I have is that I lost the ability to run a xamarin.forms app to a iPhone physical device.
The problem seems to appear a month or so ago.
At that point 2 things happened that maybe relevant to the problem.
The first is that Apple required to enable two-factor authentication.
The second is that, the keychain on my mac was corrupted and after following the recommendation of a post, I reset the keychain.
Not sure if these 2 are relevant but seems that after these 2 events, I lost the ability to run an xamarin.forms app to an iPhone physical device.
I have a valid subscription to apple's developer and prior to this incident, I was able to run a xamarin.forms app on my physical device.

I have a MacBook Air with XCode 12.4 and Visual Studio 8.9.6 (build 6)
A PC (that I use for development) with Visual Studio (16.9.4)

From XCode, I can create a new app and able to run it successfully on a physical device!
Seems that XCode doesn't have any problems with development certificates and provisioning profiles.
From XCode (as you can see in the following images) I have access to my apple account, certificates and provisioning profiles

My Apple account from XCode
89005-image2.jpg

Available certificates and provisioning profiles from XCode
88975-image1.jpg

And from XCode, I can select automatically signing and I can run successfully the app on my physical device
89006-image3.jpg

Unfortunately, that process is not successful on my PC with Visual Studio.
I'm able to run a xamarin.forms on a simulator on my Mac but NOT on a Physical device
When I'm using Automatic Provisioning then the process is failing as you can see in following image
89007-image6.jpg

The messages that appear while trying to enable Automatic Provisioning are the following

Resolving certificate...
Fetching valid and locally installed signing identities...
Syncing certificates for "MyTeam" team...
Saving Apple Development certificates...
Syncing App IDs for "MyTeam" team...
Making sure that connected devices are registered in "MyTeam" team...
Syncing devices for "MyTeam" team...
Processing ios devices...
Syncing provisioning profiles for "MyTeam" team...
Saving iOS profiles...
Fetching additional data about profile's certificates and devices for VS: WildCard Development...
Downloading the list of devices and certificates for VS: WildCard Development...
Running update request for VS: WildCard Development...

Automatic Provisioning failed: Authentication service is unavailable.

In Visual Studio I'm not able to get certificates and provisioning profile (with the same account as in XCode)
89008-image7.jpg

Manual provisioning is not working either (perhaps because I'm unable to get certificates and provisioning profiles for my apple account)

The same behavior is for the Visual Studio on my Mac, when trying to get certificates and provisioning profiles for my apple account
89091-image5.jpg

Any thoughts on how to solve this problem?
Thanks

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,297 questions
{count} votes