라벨이 sign in with apple인 게시물 표시

[IOS] Sign In With Apple 살펴보기

이미지
Sign In With Apple 살펴보기 Sign in with Apple 애플 아이디로 로그인을 할 수 있는 Sign in with Apple이 공개 된 후 적용하고 이해한 내용을 기록으로 남겨둔다. 참고 URL : https://developer.apple.com/documentation/authenticationservices/adding_the_sign_in_with_apple_flow_to_your_app 순서 : https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/authenticating_users_with_sign_in_with_apple#see-also 버튼 추가 새 프로젝트를 만들고 ViewController에 버튼을 호출하기 위한 함수를 추가한다. import AuthenticationServices 해준다. @IBOutlet weak var loginProviderStackView: UIStackView! 프로퍼티를 추가한다. func setupProviderLoginView() { let authorizationButton = ASAuthorizationAppleIDButton() authorizationButton.addTarget(self, action: #selector(handleAuthorizationAppleIDButtonPress), for: .touchUpInside) self.loginProviderStackView.addArrangedSubview(authorizationButton) } @objc func handleAuthorizationAppleIDButtonPress() { } 인증 버튼 동작 extension ViewController: ASAuthorizationControllerDelegate { } exte