<!--
{
  "availability" : [
    "macOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPreviewRepresentingActivityItem",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPreviewRepresentingActivityItem"
  },
  "title" : "NSPreviewRepresentingActivityItem"
}
-->

# NSPreviewRepresentingActivityItem

A type that adds metadata to an item you share using the macOS share sheet.

```
class NSPreviewRepresentingActivityItem
```

## Overview

An [`NSPreviewRepresentingActivityItem`](/documentation/AppKit/NSPreviewRepresentingActivityItem) object provides a concrete implementation of the [`NSPreviewRepresentableActivityItem`](/documentation/AppKit/NSPreviewRepresentableActivityItem) protocol. Use it to create shareable items for common types such as strings or images, or when you don’t want to adopt the [`NSPreviewRepresentableActivityItem`](/documentation/AppKit/NSPreviewRepresentableActivityItem) protocol directly in your app’s objects. To share the item from your app, initialize the [`NSSharingServicePicker`](/documentation/AppKit/NSSharingServicePicker) object with this object.

> Note:
> If your data consists of a URL, pass that URL directly to the sharing service picker instead of using this class.

## Topics

### Creating a Preview Activity Item

[`init(item:title:image:icon:)`](/documentation/AppKit/NSPreviewRepresentingActivityItem/init(item:title:image:icon:))

Creates a metadata object with the title, image, and icon for a shareable item.

[`init(item:title:imageProvider:iconProvider:)`](/documentation/AppKit/NSPreviewRepresentingActivityItem/init(item:title:imageProvider:iconProvider:))

Creates a metadata object that provides a title and images for a shareable item.



---

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)