<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "LocalAuthenticationEmbeddedUI",
  "identifier" : "/documentation/LocalAuthenticationEmbeddedUI/LAAuthenticationView/init(context:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Local Authentication Embedded UI"
    ],
    "preciseIdentifier" : "c:objc(cs)LAAuthenticationView(im)initWithContext:"
  },
  "title" : "init(context:)"
}
-->

# init(context:)

Creates a new authentication icon that reflects the current authentication state.

```
init(context: LAContext)
```

## Parameters

`context`

A local authentication context to associate with the icon.

## Discussion

Use this initializer to create a local authentication view and connect it to a particular
local authentication context. You typically do this in the <doc://com.apple.documentation/documentation/AppKit/NSViewController/loadView()>
method of an <doc://com.apple.documentation/documentation/AppKit/NSViewController>
subclass. You then add this view as a subview — along with any text, imagery, and
interactive elements that you need — to create a custom authentication interface.
When your interface appears, call the <doc://com.apple.documentation/documentation/LocalAuthentication/LAContext>
instance’s <doc://com.apple.documentation/documentation/LocalAuthentication/LAContext/evaluatePolicy(_:localizedReason:reply:)>
method to begin the authentication process.

---

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)