com.apple.AuthenticationServices.Authorization 错误代码 1000 [英] com.apple.AuthenticationServices.Authorization Error Code 1000

查看:33
本文介绍了com.apple.AuthenticationServices.Authorization 错误代码 1000的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 DidCompleteWitherror 中收到以下错误:

I receive the following error in DidCompleteWitherror:

com.apple.AuthenticationServices.Authorization Error Code 1000

我正在使用以下代码登录 Apple

I'm using the following code to sign in to Apple

var appleIdProvider = new ASAuthorizationAppleIdProvider();
var request = appleIdProvider.CreateRequest();
request.RequestedScopes = new ASAuthorizationScope[] { ASAuthorizationScope.Email, ASAuthorizationScope.FullName };
var authController = new ASAuthorizationController(new[] { request });
authController.Delegate = this;
authController.PresentationContextProvider = this;
authController.PerformRequests();
...
[Export("authorizationController:didCompleteWithAuthorization:")]
public void DidComplete(ASAuthorizationController controller, ASAuthorization authorization)
{
...
}

[Export("authorizationController:didCompleteWithError:")]
public void DidComplete(ASAuthorizationController controller, NSError error)
{
...
}

  • 我在 Entitlements.plist 中检查了 Apple 登录
  • 我在管理控制台中创建了应用 ID,验证了我的域.甚至网络身份验证也已经可以使用了.
  • 我尝试将配置文件切换为使用 Apple 登录的配置文件.
  • 这个错误可能是什么原因?

    What could be the reason of this error?

    推荐答案

    两天过去了.

    答案在这里:https://xamarin.github.io/bugzilla-archives/25/25141/bug.html

    我打开了 csproj,发现一些构建配置缺少 CodesignEntitlements,其中一些是空的:

    I opened csproj and discovered some build configuration were missing CodesignEntitlements and some of them were empty:

    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
    

    在所有构建配置中添加/更新它后,它终于可以工作了.

    After adding it to/updating it in all build configurations it finally works.

    PS:在此之前,我尝试创建空的 xamarin 项目(具有相同的包名称)并在模拟器上重现了该问题.然后我做了 swift 项目(使用相同的包名称)并且它运行良好.所以很明显这是 xamarin 特定的错误.

    PS: Before that I tried to create empty xamarin project (with the same bundle name) and it reproduced the problem on simulator. Then I did swift project (with the same bundle name) and it worked fine. So it was clear that it was xamarin specific bug.

    这篇关于com.apple.AuthenticationServices.Authorization 错误代码 1000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆