Last active
February 22, 2020 16:07
-
-
Save gyugyu90/799a3fb0d25665554ef3f9d28e0101c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func setupEvents() { | |
appleLoginBtn.addTarget(self, action: #selector(appleLogin), for: .touchUpInside) | |
} | |
@objc fileprivate func appleLogin() { | |
let appleIdRequest = ASAuthorizationAppleIDProvider().createRequest() | |
appleIdRequest.requestedScopes = [.email, .fullName] | |
let controller = ASAuthorizationController(authorizationRequests: [appleIdRequest]) | |
controller.delegate = self | |
controller.presentationContextProvider = self | |
controller.performRequests() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment