---
title: "activate(from:options:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsrunningapplication/activate(from:options:)"
---

# activate(from:options:)

Attempts to activate the application using the specified options.

## Declaration

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

## Parameters

- `application`: The application to activate.
- `options`: The options to use during activation.

## Return Value

Return Value Returns true if the request is allowed by the system, otherwise false.

## Discussion

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:) or equivalent prior to the target application invoking activate().

## See Also

### Activating applications

- [activate(options:)](appkit/nsrunningapplication/activate(options:).md)
- [isActive](appkit/nsrunningapplication/isactive.md)
- [NSApplication.ActivationOptions](appkit/nsapplication/activationoptions.md)
- [activationPolicy](appkit/nsrunningapplication/activationpolicy.md)
- [NSApplication.ActivationPolicy](appkit/nsapplication/activationpolicy-swift.enum.md)
