<!--
{
  "availability" : [
    "macOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "LocalAuthentication",
  "identifier" : "/documentation/LocalAuthentication/LocalAuthenticationView/init(_:context:)-676qx",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Local Authentication",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:28_LocalAuthentication_SwiftUI0aB4ViewV_7contextACy0cD04TextVGAE18LocalizedStringKeyV_So9LAContextCtcAGRszrlufc"
  },
  "title" : "init(_:context:)"
}
-->

# init(_:context:)

Creates a local authentication view with a localizable title and required context.

```
@MainActor @preconcurrency init(_ titleKey: LocalizedStringKey, context: LAContext) where Label == Text
```

## Parameters

`titleKey`

A localized title that displays below the authentication view.

`context`

A context used to evaluate authentication policies.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)