getStateOfSafariExtension(withIdentifier:completionHandler:)
Returns the current state of a Safari extension.
Declaration
class func getStateOfSafariExtension(withIdentifier identifier: String, completionHandler: @escaping @MainActor @Sendable (SFSafariExtensionState?, (any Error)?) -> Void)class func stateOfSafariExtension(withIdentifier identifier: String) async throws -> SFSafariExtensionStateParameters
- identifier:
The bundle identifier for the Safari 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 extension, or
nilif the system can’t find the extension.- error
An error object indicating the reason for the failure, or
nilif no failure occurs.
Discussion
Use this method to check on the state of one of the Safari app or web extensions embedded inside your app.