This was working till few days back. It appears one of the recent updates to Xamain.iOS has broken it.
I have implemented OneDrive client in my project as per Build Xamarin apps with Microsoft Graph.
This is a Xamarin Forms project. Installed Microsoft.Graph only in the common project and installed Microsoft.Identity.Client in all projects.
After successful login into OneDrive Service, it is throwing the following exception:
System.TypeInitializationException
Message=The type initializer for 'System.Text.Json.JsonSerializer' threw an exception.
It is failing executing the following code:
IDriveItemChildrenCollectionPage files = null;
files = await OdGraphClient.Me.Drive.Root
.Children
.Request()
.GetAsync();