Instance Method


Activates the application.


func activate()


This call is synchronous. The application will be in a state ready to handle events when this method returns.

If the application was not running prior to calling activate(), it will be launched automatically.

If the application is launched as a result of calling this method and has previously been launched via launch(), the launch arguments and environment variables from the original call to launch() will be supplied again.

Unlike launch(), a call to activate() will not terminate the existing instance if the application is already running.

Any failure in the activation or launch sequence will be reported as a test failure and the test will be halted at that point.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software