<!--
{
  "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/beginActivity(options:reason:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSProcessInfo(im)beginActivityWithOptions:reason:"
  },
  "title" : "beginActivity(options:reason:)"
}
-->

# beginActivity(options:reason:)

Begin an activity using the given options and reason.

```
func beginActivity(options: ProcessInfo.ActivityOptions = [], reason: String) -> any NSObjectProtocol
```

## Parameters

`options`

Options for the activity. See [`ProcessInfo.ActivityOptions`](/documentation/Foundation/ProcessInfo/ActivityOptions) for possible values.

`reason`

A string used in debugging to indicate the reason the activity began.

## Return Value

An object token representing the activity.

## Discussion

Indicate completion of the activity by calling [`endActivity(_:)`](/documentation/Foundation/ProcessInfo/endActivity(_:)) passing the returned object as the argument.

---

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)