Instance Method

activate(options:)

Attempts to activate the application using the specified options.

Declaration

func activate(options: NSApplication.ActivationOptions = []) -> Bool

Parameters

options

The options to use when activating the application. See NSApplication.ActivationOptions for the possible values.

Return Value

true if the application was activated successfully, otherwise false.

Discussion

This method will return false if the application has quit, or is not a type of application than can be activated.

See Also

Activating Applications

var isActive: Bool

Indicates whether the application is currently frontmost.

var activationPolicy: NSApplication.ActivationPolicy

Indicates the activation policy of the application.