我使用电容器登录与苹果登录与苹果,这是我的代码:
registerApple(apple: string) {
SignInWithApple.authorize().then(resp => {
this.loginSocial(resp);
console.log("respuesta", resp.response);
if (this.error === true) {
this.activateTabMenu(true);
this.navCtrl.navigateRoot("/home");
} else {
this.register(resp.response, resp.response.user, null, null);
this.user.socialType = apple;
this.viewMode = "view1";
this.progressValue = 0.3;
this.dataDepTp();
}
}).catch((err) => console.log(err));
}
问题是,当我测试它时,它不工作,Apple GUI不打开,xcode控制台打印下一条消息:
[log] - {"code":"UNIMPLEMENTED"}
我还在xcode和apple开发者中启用了“登录Apple”
我能做什么呢?
1条答案
按热度按时间ukqbszuj1#
Run on physical device or on macOS, iOS has a few issues with this plugin - https://github.com/capacitor-community/apple-sign-in/issues/23
The following example is Capacitor 3/4 related
Signin with apple requires an options field with a nonce.
The example below uses firebase and npm sha.js
Have a look at the https://github.com/capacitor-community/apple-sign-in docs
Also, the Firebase Apple Sign-in Setup guide explains the apple email relay config - https://firebase.google.com/docs/auth/ios/apple?authuser=0&hl=en'