Skip to content

IMHitesh/HSAppleSignIn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

SignIn with Apple demo : Swift

Add AppleSignIn folder into your project.

Enable SignIn with Apple in Capablities.

Goto your UIViewController and Add Container view for SignIn with apple.

Call loginWithApple function:

if #available(iOS 13.0, *) {

            appleSignIn.loginWithApple(view:viewAppleButton, completionBlock: { (userInfo, message) in
                if let userInfo = userInfo{
                    print(userInfo.email)
                    print(userInfo.userid)
                    print(userInfo.firstName)
                    print(userInfo.lastName)
                    print(userInfo.fullName)
                }else if let message = message{
                    print("Error Message: \(message)")
                }else{
                    print("Unexpected error!")
                }
            })
        }else{
            viewAppleButton.isHidden = true
        }

If everything is proper then you will received the all user info.

Advantage:

No need to write single for signIn with apple.

Automatically maintain all info in keychain.

About

SignIn with Apple and Signup with demo : Swift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages