<!--
{
  "availability" : [
    "iOS: 26.2.0 -",
    "iPadOS: 26.2.0 -",
    "macCatalyst: 26.2.0 -",
    "visionOS: 26.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SafariServices",
  "identifier" : "/documentation/SafariServices/SFSafariExtensionManager/getStateOfExtension(withIdentifier:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Safari Services"
    ],
    "preciseIdentifier" : "c:objc(cs)SFSafariExtensionManager(cm)getStateOfExtensionWithIdentifier:completionHandler:"
  },
  "title" : "getStateOfExtension(withIdentifier:completionHandler:)"
}
-->

# getStateOfExtension(withIdentifier:completionHandler:)

Returns the current state of a Safari web extension.

```
class func getStateOfExtension(withIdentifier identifier: String, completionHandler: @escaping @Sendable (SFSafariExtensionState?, (any Error)?) -> Void)
```

## Parameters

`identifier`

The bundle identifier for the Safari web extension to check.

`completionHandler`

The completion handler the system calls with either the extension’s state or an error.

- state: An object that describes the current state of the Safari web extension, or `nil` if the system can’t find the extension.
- error: An error object indicating the reason for the failure, or `nil` if no failure occurs.

## Discussion

Use this method to check on the state of a Safari web extension embedded inside your app.

---

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)