I'm trying to implement Apple Sign In in my iOS app using the expo-apple-authentication package, but I'm not being able to make the button show up. Even though I'm using the exact same code as the documentation:
<AppleAuthentication.AppleAuthenticationButton
buttonType={
AppleAuthentication.AppleAuthenticationButtonType.SIGN_IN
}
buttonStyle={
AppleAuthentication.AppleAuthenticationButtonStyle.BLACK
}
cornerRadius={5}
onPress={() => {
}}
/>
It's worth noticing that the call to AppleAuthentication.isAvailableAsync() returns true.
I'm testing it in a Simulator. Is it not supposed to work in a dev environment? how am I supposed to test it then?
For some odd reason the button does not have a default size. Applying your own style fixes it.
<AppleAuthentication.AppleAuthenticationButton
onPress={onSignIn}
buttonType={AppleAuthentication.AppleAuthenticationButtonType.SIGN_IN}
buttonStyle={AppleAuthentication.AppleAuthenticationButtonStyle.BLACK}
style={{ width: 200, height: 64 }} // You must choose default size
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With