问题
I'm currently on developing some little application for iOS and Android. Therefore I need an OAuth2 authentication.
How I proceeded (from here)
- Create a new Xamarin.Forms project from the templates with the default Item and About page
- Add Dependency for
Xamarin.Auth
Use the button on the about page to trigger a function with the following:
var authenticator = new OAuth2Authenticator( "CLIENTID" , "SCOPE", new Uri("AUTH_URL"), new Uri("REDIRECT_URL) null, true);
- Add the iOS initializer in the AppDelegate.cs
global::Xamarin.Auth.Presenters.XamarinIOS.AuthenticationConfiguration.Init();
- Add the URL Types in
Info.plist
I'm using the Xamarin Live Player to deploy this on my iPhone 7. When I'm triggering the button, I get the following error message:Uncaught Exception: Bad convert with overflow instruction 'IL_0001: conv.ovf.i.un' (NInterpretExcetion)
Some ideas how to fix this?
来源:https://stackoverflow.com/questions/51446286/xamarin-forms-with-xamarin-player-oauth2-ninterpretexception