How to use SignInWithAppleButton in SwiftUI

Apple has made it even easier to implement its new Sign in with Apple functionality

Kelvin Tan
Swiftly Engineered iOS

--

Photo by Yoal Desurmont on Unsplash.

As shown at WWDC 2020, Apple has made it even easier to implement Apple Sign In. By simply calling the struct, you will be able to have Apple Sign In right on your screen.

“A control that you add to your interface to allow users to sign in with their Apple ID.” — Apple’s documentation

Prerequisites

To follow along with this tutorial, you’ll need some basic knowledge in:

  • Swift
  • At least Xcode 12+

Note: This only supports iOS 14+.

SignInWithAppleButton

You may indicate if you would like to be a signup or a sign-in. Here, you will be doing a sign-in:

  1. The request scope is where you can specify what kind of information you would like to collect from the…

--

--

Kelvin Tan
Swiftly Engineered iOS

Father, husband, software engineer. Building software and building a family, one line of code and one moment at a time. 🚀💻💙 http://ko-fi.com/kelvintanzy