Implementing delegate methods and button actions

Now, your app is displaying a Sign in with Apple button on the screen when it is launched, but it doesn't work yet. To implement the functionality of the Sign in with Apple button, you'll need to make SignInViewController conform to the ASAuthorizationControllerDelegate and ASAuthorizationControllerPresentationContextProviding protocols.

ASAuthorizationControllerDelegate has two optional methods that you will implement:

  • authorizationController(controller: didCompleteWithAuthorization:): This will be executed if the user enters the correct Apple ID and password.
  • authorizationController(controller: didCompleteWithError:): This will be executed if the process was unsuccessful.

ASAuthorizationControllerPresentationContextProviding ...

Get iOS 13 Programming for Beginners - Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.