我正在使用expo,进行本机响应,并使用Apple登录。当我使用模拟器中的expo登录Apple时,一切正常。
当我将应用程序推送到TestFlight并尝试使用Apple登录时,该应用程序立即崩溃。没有引发错误消息或警告,它只是关闭了应用程序。所以我不确定为什么会这样或如何获取崩溃日志。
其他人有没有经历过?
expo --version:3.21.5 sdk-37.0.1
<AppleAuthentication.AppleAuthenticationButton
buttonType={AppleAuthentication.AppleAuthenticationButtonType.SIGN_IN}
buttonStyle={AppleAuthentication.AppleAuthenticationButtonStyle.BLACK}
cornerRadius={5}
style={{
width: Constant.width * 0.92,
height: 44,
}}
onPress={async () => {
try {
setAppleLoggingIn(true);
const credential = await AppleAuthentication.signInAsync({
requestedScopes: [
AppleAuthentication.AppleAuthenticationScope.FULL_NAME,
AppleAuthentication.AppleAuthenticationScope.EMAIL,
],
});
// signed in
onSignIn(credential);
setAppleLoggingIn(false);
} catch (e) {
if (e.code === "ERR_CANCELED") {
// handle that the user canceled the sign-in flow
setAppleLoggingIn(false);
return {cancelled: true};
} else {
// handle other errors
setAppleLoggingIn(false);
return {error: true};
}
}
}}
/>
答案 0 :(得分:0)
发现我使用了错误的服务ID。推送到TestFlight时,您必须将其从host.exp.Exponent
更新为您的捆绑包ID。