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

# activate(from:options:)

Attempts to activate the application using the specified options.

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

## Parameters

`application`

The application to activate.

`options`

The options to use during activation.

## Return Value

Returns <doc://com.apple.documentation/documentation/Swift/true> if the request is allowed by the system, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Use this method to request app activation. Calling this method doesn’t guarantee app activation. For cooperative activation, the other application should call [`yieldActivation(to:)`](/documentation/AppKit/NSApplication/yieldActivation(to:)) or equivalent prior to the target application invoking [`activate()`](/documentation/AppKit/NSApplication/activate()).

---

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)