Search code examples
iosiphonexcodeapple-sign-in

Apple Sign In below ios13


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?)?


Solution

  • 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.