I have a question about Apple Sign In. In App Store Guideline there We can found that Apple Sign in is mandatory when app uses third party sign in options (like google or facebook).As I know Apple sign in mechanism was added in ios 13. What if I want to build app with minimum version of iOS set to 11 or 12? Still I need to implement Apple sign in (and if so, how?)?
private func setupLoginWithAppleButton() {
if #available(iOS 13.0, *) {
//Show sign-in with apple button. Create button here via code if you need.
} else {
// Fallback on earlier versions
//Hide your sign in with apple button here.
}
}
if you are getting error: Authorization returned an error: The operation couldn’t be completed. (com.apple.AuthenticationServices.AuthorizationError error 1000.)
Simply Add "Sign In with Apple" from Capability.
It is not necessary to support lower than ios 13 but you can also support lower than ios 13. You can read this guideline https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms
first you have to configure your app for redirect url, bottom line is that you have to use the mechanism like you want to provide apple sign in Android, web or other platefrom.
the best tutorial I found to configure is: https://developer.okta.com/blog/2019/06/04/what-the-heck-is-sign-in-with-apple if you successfully configure then
follow these steps 1-put your button's code in fall back os version.
2-Set apple sign in image on the button you can download button image from here https://appleid.cdn-apple.com/appleid/button.
3- if you successfully followed tutorial then after clicking sign in button and open this api https://appleid.apple.com/auth/authorize?response_type=code&response_mode=form_post&client_id=[your apple sign in client id]&redirect_uri=https%3A%2F%2Fexample-app.com%2Fredirect&state=78536bf485&scope=name+email
in wkwebview or otside the app depending upon you then you will see screen like this enter your credential of apple sign in then if you get success it will redirect to your redirect uri
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