I am working with expo, react native, and apple sign in. When I work with apple sign in in expo in my simulators everything works fine.
When I push the app to TestFlight and I try to sign in with Apple, the app immediately crashes. No error messages or warnings are thrown, it just closes the app. So I am not sure why this is happening or how to get a log of the crash.
Has anyone else experienced this?
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};
}
}
}}
/>
Found out that I was using the wrong service ID. When you push to TestFlight you have to update this from host.exp.Exponent
to what ever your bundle ID is.