<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSRunningApplication/activate(options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSRunningApplication(im)activateWithOptions:"
  },
  "title" : "activate(options:)"
}
-->

# activate(options:)

Attempts to activate the application using the specified options.

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

## Parameters

`options`

The options to use when activating the application. See [`NSApplication.ActivationOptions`](/documentation/AppKit/NSApplication/ActivationOptions) for the possible values.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the application was activated successfully, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

This method will return <doc://com.apple.documentation/documentation/Swift/false> if the application has quit, or is not a type of application than can be activated.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)