Instance Method


Attempts to activate the application using the specified options.


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



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.


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.

enum NSApplication.ActivationPolicy

Activation policies (used by activationPolicy) that control whether and how an app may be activated.