Xamarin iOS - Implementing Sign in with Apple



我在这里按照实现说明将Sign in with Apple添加到现有的Xamarin iOS移动应用程序:https://learn.microsoft.com/en-us/xamarin/ios/platform/ios13/sign-in

如果我简单地将以下行添加到appdelegate . finishhedlaunching ():

var appleIdProvider = new ASAuthorizationAppleIdProvider();

我收到以下异常:System.Exception: Could not create an native instance of the type 'AuthenticationServices.ASAuthorizationAppleIdProvider': the native class hasn't been loaded. It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.

我似乎是这个星球上唯一一个遇到这种情况的人(并且无法自己弄清楚),因为这个确切的消息在谷歌上得到零结果。我是不是漏掉了什么参考资料?

我不确定从哪里开始寻找,以解决这个问题。我下载了官方的代码示例在https://github.com/xamarin/ios-samples/tree/main/ios13/AddingTheSignInWithAppleFlowToYourApp,我无法在项目中找到任何差异,或在任何参考文献。

提前感谢!

我明白了。我使用的模拟器是iOS 12.5,直到iOS 13才引入authorizationappleidprovider。

最新更新