<!--
{
  "availability" : [
    "iOS: 16.1.0 - 16.2.0",
    "iPadOS: 16.1.0 - 16.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "ActivityKit",
  "identifier" : "/documentation/ActivityKit/Activity/request(attributes:contentState:pushType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "ActivityKit"
    ],
    "preciseIdentifier" : "s:11ActivityKit0A0C7request10attributes12contentState8pushTypeACyxGx_07ContentF0QzAA04PushH0VSgtKFZ"
  },
  "title" : "request(attributes:contentState:pushType:)"
}
-->

# request(attributes:contentState:pushType:)

Requests and starts a Live Activity.

```
static func request(attributes: Attributes, contentState: Activity<Attributes>.ContentState, pushType: PushType? = nil) throws -> Activity<Attributes>
```

## Parameters

`attributes`

A set of attributes that describe the Live Activity and its static content.

`contentState`

A structure that describes the dynamic content of the Live Activity that changes over time.

`pushType`

A value that indicates whether the Live Activity receives updates to its dynamic
content with ActivityKit push notifications. Pass `nil` to start a Live Activity that only receives
updates from the app with the [`update(_:)`](/documentation/ActivityKit/Activity/update(_:)) function.
To start a Live Activity that receives updates to its dynamic content with ActivityKit push
notifications in addition to the [`update(_:)`](/documentation/ActivityKit/Activity/update(_:)) function, pass
[`token`](/documentation/ActivityKit/PushType/token) to this parameter.

## Return Value

The object that represents the started Live Activity.

## Discussion

Use this function to request and start a Live Activity from your app while it’s in the foreground. Note
that you can’t do this while your app is in the background, unless you adopt <doc://com.apple.documentation/documentation/AppIntents>
and start the Live Activity using a <doc://com.apple.documentation/documentation/AppIntents/LiveActivityIntent>.

If your Live Activity displays image assets, the system requires them to use a resolution that’s
smaller or equal to the size of the Live Activity presentation for a device. If you use an image asset
that’s larger than the size of the Live Activity presentation, the system may fail to start the Live
Activity. For information about the sizes of Live Activity presentations, see
[Human Interface Guidelines > Live Activities](https://developer.apple.com/design/human-interface-guidelines/components/system-experiences/live-activities).

For additional information on starting a Live Activity, see [Displaying live data with Live Activities](/documentation/ActivityKit/displaying-live-data-with-live-activities).

> Throws: ``doc://com.apple.activitykit/documentation/ActivityKit/ActivityAuthorizationError`` if the app can’t start a new Live Activity. For example, ``doc://com.apple.activitykit/documentation/ActivityKit/ActivityAuthorizationError/denied`` indicates that a person deactivated Live Activities for the app.

---

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)