Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sign in with Apple ASAuthorizationControllerDelegate methods not called

I am trying to prepare my app for the iOS13 "Sign in with Apple" feature. I have implemented the ASAuthorizationControllerDelegate methods and set my ASAuthorizationController's delegate. When I tap the sign in with Apple button, after I enter the password there is no response. The password is correct (I know this because the field shakes when incorrect), however nothing happens. The sign in dialog doesn't dismiss and the delegates aren't called.

    @available(iOS 13.0, *)
    @objc private func didTapAppleButton() {
        let request = ASAuthorizationAppleIDProvider().createRequest()
        request.requestedScopes = [.fullName, .email]
        let vc = ASAuthorizationController(authorizationRequests: [request])
        vc.presentationContextProvider = self
        vc.delegate = self
        vc.performRequests()
    }

Does anyone else have this issue?

like image 300
Kex Avatar asked Aug 30 '19 07:08

Kex


1 Answers

Do you allocated the code into a separate class so that your ViewController does not look like a trash heap? And you applied good practice principles to SOLID software development? Apl says - In vain XD!

Only ViewController can be a delegate.

It looks like a bug, alas.

like image 108
Sergey Sergeyev Avatar answered Nov 15 '22 04:11

Sergey Sergeyev