Xamarin Forms with Xamarin Player OAuth2 NInterpretException

一曲冷凌霜 提交于 2019-12-25 03:32:13

问题


I'm currently on developing some little application for iOS and Android. Therefore I need an OAuth2 authentication.

How I proceeded (from here)

  1. Create a new Xamarin.Forms project from the templates with the default Item and About page
  2. Add Dependency for Xamarin.Auth
  3. 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);
    
  4. Add the iOS initializer in the AppDelegate.cs global::Xamarin.Auth.Presenters.XamarinIOS.AuthenticationConfiguration.Init();
  5. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!