<!--
{
  "availability" : [
    "iOS: 16.1.0 -",
    "iPadOS: 16.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ActivityKit",
  "identifier" : "/documentation/ActivityKit/ActivityAttributes",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "ActivityKit"
    ],
    "preciseIdentifier" : "s:11ActivityKit0A10AttributesP"
  },
  "title" : "ActivityAttributes"
}
-->

# ActivityAttributes

The protocol you implement to describe the content of a Live Activity.

```
protocol ActivityAttributes : Decodable, Encodable
```

## Overview

The `ActivityAttributes` protocol describes the content that appears in your Live Activity. Its
inner type [`ContentState`](/documentation/ActivityKit/ActivityAttributes/ContentState) represents the dynamic content
of the Live Activity.

The following example shows an implementation of the `ActivityAttributes` protocol for a pizza
delivery app. The app’s Live Activity shows the number of ordered pizzas and the total amount on the
bill as static data and the name of the driver and an estimated delivery time as dynamic data that changes
over time. Note how the implementation defines the type alias `PizzaDeliveryStatus` to make
the code more descriptive and easier to read.

```swift
public import Foundation
import ActivityKit

struct PizzaDeliveryAttributes: ActivityAttributes {
    public typealias PizzaDeliveryStatus = ContentState

    public struct ContentState: Codable, Hashable {
        var driverName: String
        var deliveryTimer: ClosedRange<Date>
    }

    var numberOfPizzas: Int
    var totalAmount: String
    var orderNumber: String
}
```

## Topics

### Dynamic content

[`ContentState`](/documentation/ActivityKit/ActivityAttributes/ContentState)

The associated type that describes the dynamic content of a Live Activity.



---

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)