xamarin - Xamarin 表单与 Xamarin Player OAuth2 NInterpretException
问题描述
我目前正在为 iOS 和 Android 开发一些小应用程序。因此我需要 OAuth2 身份验证。
我是如何进行的(从这里开始)
- 从具有默认项目和关于页面的模板创建一个新的 Xamarin.Forms 项目
- 添加依赖项
Xamarin.Auth
使用 about 页面上的按钮触发具有以下功能的功能:
var authenticator = new OAuth2Authenticator( "CLIENTID" , "SCOPE", new Uri("AUTH_URL"), new Uri("REDIRECT_URL) null, true);
- 在 AppDelegate.cs 中添加 iOS 初始化程序
global::Xamarin.Auth.Presenters.XamarinIOS.AuthenticationConfiguration.Init();
- 添加 URL 类型
Info.plist
我正在使用 Xamarin Live Player 在我的 iPhone 7 上部署它。当我触发按钮时,我收到以下错误消息:
Uncaught Exception: Bad convert with overflow instruction 'IL_0001: conv.ovf.i.un' (NInterpretExcetion)
一些想法如何解决这个问题?
解决方案
推荐阅读
- c# - 使用 InMemory 测试 ASP.NET Core API 控制器
- c# - C# 聊天程序
- ms-word - 是否可以为表格标题设置列宽和背景颜色
- javascript - 如何删除 Metronic 管理主题中的左侧边栏?
- neural-network - Tesseract 无法识别带有手写文字的图像,我该怎么办?
- java - Android Studio 中的界面如何工作?
- html - 在 Angular 中,是否有办法根据您在第一个表中选择的内容填写第二个表?
- python - 使用 RecycleView 滚动时如何保持 Kivy ToggleButton 状态?
- c - 为什么 memset 部分初始化?
- php - 损坏的php重定向功能