<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIActivityItemProvider",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIActivityItemProvider"
  },
  "title" : "UIActivityItemProvider"
}
-->

# UIActivityItemProvider

A proxy for data that passes to an activity view controller.

```
class UIActivityItemProvider
```

## Overview

You can use a provider object in situations where you want to make data available for use by an activity but you want to delay providing that data until it’s actually needed. For example, you might use a provider object to represent a large video file that needs to be processed before it can be shared to a user’s social media account.

When you initialize a [`UIActivityViewController`](/documentation/UIKit/UIActivityViewController) object, you can pass a provider object in addition to any other data objects. When the user selects an activity, the activity view controller adds your provider object (which is also an operation object) to an operation queue so that it can begin to gather or process the needed data.

### Subclassing notes

You must subclass `UIActivityItemProvider` and implement its [`item`](/documentation/UIKit/UIActivityItemProvider/item) method, which is called to generate the item data. You implement this method instead of the normal <doc://com.apple.documentation/documentation/Foundation/Operation/main()> method you’d implement for an operation object. (The <doc://com.apple.documentation/documentation/Foundation/Operation/main()> method calls the [`item`](/documentation/UIKit/UIActivityItemProvider/item) method when the operation object is executed.) Your implementation of the [`item`](/documentation/UIKit/UIActivityItemProvider/item) method should do whatever work is necessary to create and return the data.

## Topics

### Initializing the provider

[`init(placeholderItem:)`](/documentation/UIKit/UIActivityItemProvider/init(placeholderItem:))

Initializes and returns a provider object with the specified placeholder data.

### Accessing the provider attributes

[`item`](/documentation/UIKit/UIActivityItemProvider/item)

Generates and returns the actual data-bearing object.

[`placeholderItem`](/documentation/UIKit/UIActivityItemProvider/placeholderItem)

The placeholder object you specified at initialization time.

[`activityType`](/documentation/UIKit/UIActivityItemProvider/activityType)

The type of the activity object that is expecting the data.



---

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)