<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/ProcessInfo/ActivityOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSActivityOptions"
  },
  "title" : "ProcessInfo.ActivityOptions"
}
-->

# ProcessInfo.ActivityOptions

Option flags used with [`beginActivity(options:reason:)`](/documentation/Foundation/ProcessInfo/beginActivity(options:reason:)) and [`performActivity(options:reason:using:)`](/documentation/Foundation/ProcessInfo/performActivity(options:reason:using:)).

```
struct ActivityOptions
```

## Overview

To include one of these individual flags in one of the sets, use bitwise `OR`; for example, during a presentation you might use:

```objc
NSActivityUserInitiated | NSActivityIdleDisplaySleepDisabled
```

To exclude from one of the sets, use bitwise `AND` with `NOT`; for example, during a user initiated action that may be safely terminated with no application interaction in case of logout you might use:

```objc
NSActivityUserInitiated & ~NSActivitySuddenTerminationDisabled
```

## Topics

### Constants

[`idleDisplaySleepDisabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/idleDisplaySleepDisabled)

A flag to require the screen to stay powered on.

[`idleSystemSleepDisabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/idleSystemSleepDisabled)

A flag to prevent idle sleep.

[`suddenTerminationDisabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/suddenTerminationDisabled)

A flag to prevent sudden termination.

[`automaticTerminationDisabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/automaticTerminationDisabled)

A flag to prevent automatic termination.

[`userInitiated`](/documentation/Foundation/ProcessInfo/ActivityOptions/userInitiated)

A flag to indicate the app is performing a user-requested action.

[`userInteractive`](/documentation/Foundation/ProcessInfo/ActivityOptions/userInteractive)

A flag to indicate the app is responding to user interaction.

[`userInitiatedAllowingIdleSystemSleep`](/documentation/Foundation/ProcessInfo/ActivityOptions/userInitiatedAllowingIdleSystemSleep)

A flag to indicate the app is performing a user-requested action, but that the system can sleep on idle.

[`background`](/documentation/Foundation/ProcessInfo/ActivityOptions/background)

A flag to indicate the app has initiated some kind of work, but not as the direct result of user request.

[`latencyCritical`](/documentation/Foundation/ProcessInfo/ActivityOptions/latencyCritical)

A flag to indicate the activity requires the highest amount of timer and I/O precision available.

[`animationTrackingEnabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/animationTrackingEnabled)

A flag to track the activity with an animation signpost interval.

[`trackingEnabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/trackingEnabled)

A flag to track the activity with a signpost interval.

### Initializers

[`init(rawValue:)`](/documentation/Foundation/ProcessInfo/ActivityOptions/init(rawValue:))

[`idleDisplaySleepDisabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/idleDisplaySleepDisabled)

A flag to require the screen to stay powered on.

[`idleSystemSleepDisabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/idleSystemSleepDisabled)

A flag to prevent idle sleep.

[`suddenTerminationDisabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/suddenTerminationDisabled)

A flag to prevent sudden termination.

[`automaticTerminationDisabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/automaticTerminationDisabled)

A flag to prevent automatic termination.

[`userInitiated`](/documentation/Foundation/ProcessInfo/ActivityOptions/userInitiated)

A flag to indicate the app is performing a user-requested action.

[`userInteractive`](/documentation/Foundation/ProcessInfo/ActivityOptions/userInteractive)

A flag to indicate the app is responding to user interaction.

[`userInitiatedAllowingIdleSystemSleep`](/documentation/Foundation/ProcessInfo/ActivityOptions/userInitiatedAllowingIdleSystemSleep)

A flag to indicate the app is performing a user-requested action, but that the system can sleep on idle.

[`background`](/documentation/Foundation/ProcessInfo/ActivityOptions/background)

A flag to indicate the app has initiated some kind of work, but not as the direct result of user request.

[`latencyCritical`](/documentation/Foundation/ProcessInfo/ActivityOptions/latencyCritical)

A flag to indicate the activity requires the highest amount of timer and I/O precision available.

[`animationTrackingEnabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/animationTrackingEnabled)

A flag to track the activity with an animation signpost interval.

[`trackingEnabled`](/documentation/Foundation/ProcessInfo/ActivityOptions/trackingEnabled)

A flag to track the activity with a signpost interval.



---

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)