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

# UIActivityItemSource

A set of methods that an activity view controller uses to retrieve the data items to act on.

```
protocol UIActivityItemSource : NSObjectProtocol
```

## Overview

You can use this protocol in situations where you want to provide the data from one of your app’s existing objects instead of creating a separate [`UIActivityItemProvider`](/documentation/UIKit/UIActivityItemProvider) object. When implementing this protocol, your object becomes the data provider, providing the view controller with access to the items.

Because the methods of this protocol are executed on your app’s main thread, you should avoid using this protocol in cases where the data objects might take a significant amount of time to create. When creating large data objects, consider using a [`UIActivityItemProvider`](/documentation/UIKit/UIActivityItemProvider) object instead.

## Topics

### Getting the data items

[`activityViewControllerPlaceholderItem(_:)`](/documentation/UIKit/UIActivityItemSource/activityViewControllerPlaceholderItem(_:))

Returns the placeholder object for the data.

[`activityViewController(_:itemForActivityType:)`](/documentation/UIKit/UIActivityItemSource/activityViewController(_:itemForActivityType:))

Returns the data object to be acted upon.

### Providing information about the data items

[`activityViewController(_:subjectForActivityType:)`](/documentation/UIKit/UIActivityItemSource/activityViewController(_:subjectForActivityType:))

For activities that support a subject field, returns the subject for the item.

[`activityViewController(_:dataTypeIdentifierForActivityType:)`](/documentation/UIKit/UIActivityItemSource/activityViewController(_:dataTypeIdentifierForActivityType:))

For items that are provided as data, returns the UTI for the item.

[`activityViewController(_:thumbnailImageForActivityType:suggestedSize:)`](/documentation/UIKit/UIActivityItemSource/activityViewController(_:thumbnailImageForActivityType:suggestedSize:))

For activities that support a preview image, returns a thumbnail preview image for the item.

### Providing metadata for accelerated previews

[`activityViewControllerLinkMetadata(_:)`](/documentation/UIKit/UIActivityItemSource/activityViewControllerLinkMetadata(_:))

Returns metadata to display in the preview header of the share sheet.



---

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)