Class

SFSafariApplication

A proxy for the Safari app.

Declaration

class SFSafariApplication : NSObject

Overview

The SFSafariApplication class is used by a Safari app extension to access the active Safari window, open a new window, and update the toolbar items on a window. An application that acts as a host container for a Safari app extension can use this class to send messages to the app extension. There is no object instance for this class.

Topics

Communicating With the App Extension

Working with Windows

class func getActiveWindow(completionHandler: (SFSafariWindow?) -> Void)

Calls the completion handler with the active browser window.

class func showPreferencesForExtension(withIdentifier: String, completionHandler: ((Error?) -> Void)? = nil)

Launches Safari and opens the preferences panel for a Safari app extension.

Updating Toolbar Items

class func setToolbarItemsNeedUpdate()

Updates the enabled states and badges of toolbar items.

Relationships

Inherits From

Conforms To

See Also

Safari App Extensions

Safari App Extensions

Learn how Safari app extensions extend the web-browsing experience in Safari by leveraging web technologies and native code.

class SFSafariWindow

A proxy for a Safari window.

class SFSafariPage

A proxy for a Safari webpage.

class SFSafariTab

A proxy for a tab in a Safari window.