init(_:reason:context:result:)
Creates a local authentication view with a title.
Declaration
@MainActor @preconcurrency init<S>(_ title: S, reason: Text, context: LAContext? = nil, result: @escaping (Result<Void, any Error>) -> Void) where Label == Text, S : StringProtocolParameters
- title:
A title that displays below the authentication view.
- reason:
A localized reason that describes why your app presents an authentication prompt to the user.
- context:
A context used to evaluate authentication policies. If
nil, the system creates one. - result:
A closure to call when the authentication succeeds or fails.
resultA Result instance that indicates success or failure with a reason.