世博会反应本机苹果登录在 TestFlight 中崩溃
expo react native apple sign in crashing in TestFlight
我正在使用 expo、react native 和 apple sign in。当我在我的模拟器中使用 apple sign in expo 时,一切正常。
当我将应用程序推送到 TestFlight 并尝试使用 Apple 登录时,应用程序立即崩溃。不会抛出错误消息或警告,它只是关闭应用程序。所以我不确定为什么会发生这种情况或如何获取崩溃日志。
有没有其他人遇到过这种情况?
世博会——版本: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};
}
}
}}
/>
发现我使用了错误的服务 ID。当您推送到 TestFlight 时,您必须将其从 host.exp.Exponent
更新为您的包 ID。
我正在使用 expo、react native 和 apple sign in。当我在我的模拟器中使用 apple sign in expo 时,一切正常。
当我将应用程序推送到 TestFlight 并尝试使用 Apple 登录时,应用程序立即崩溃。不会抛出错误消息或警告,它只是关闭应用程序。所以我不确定为什么会发生这种情况或如何获取崩溃日志。
有没有其他人遇到过这种情况?
世博会——版本: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};
}
}
}}
/>
发现我使用了错误的服务 ID。当您推送到 TestFlight 时,您必须将其从 host.exp.Exponent
更新为您的包 ID。