A control you add to your interface that enables users to initiate
the Sign In with Apple flow.
## Initialization
A SignInWithApple instance is initialized with a `SignInWithAppleButton.Label`,
an onRequest closure for configuring an authorization request,
and a onCompletion closure for handling the results of the authorization request.
SignInWithAppleButton(
.signIn,
onRequest: { request in
request.requestedScopes = [.fullName, .email]
},
onCompletion: { result in
switch result {
case .success(let authResults)
print("Auth Success!")
case .failure(let error)
print("Auth Failed: " + printError)
}
}
)
Creates an instance that displays a control to Sign in with Apple.
- Parameters:
- label: The label set on the control (see `ButtonType`).
Defaults to .signIn.
- onRequest: Closure for configuring the authorization request.
- onCompletion: Handler for a completed authorization request.
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
SignInWithAppleButton.body
This protocol needs associated types that cannot yet cross the bridge.