<!--
{
  "availability" : [
    "macOS: 10.8.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSharingServicePicker/init(items:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSharingServicePicker(im)initWithItems:"
  },
  "title" : "init(items:)"
}
-->

# init(items:)

Creates a new sharing service picker for the selected items.

```
init(items: [Any])
```

## Parameters

`items`

The items to be shared. The items in the array must conform to the [`NSPasteboardWriting`](/documentation/AppKit/NSPasteboardWriting) or [`NSPreviewRepresentableActivityItem`](/documentation/AppKit/NSPreviewRepresentableActivityItem) protocol. For example, you can specify an <doc://com.apple.documentation/documentation/Foundation/NSString>, [`NSImage`](/documentation/AppKit/NSImage), <doc://com.apple.documentation/documentation/Foundation/NSURL>, or similar type directly. You can also specify <doc://com.apple.documentation/documentation/Foundation/NSItemProvider> or [`NSDocument`](/documentation/AppKit/NSDocument) objects in the array to share those types.

## Return Value

A configured sharing service picker.

## Discussion

If an item is an <doc://com.apple.documentation/documentation/Foundation/NSURL> object and contains a file URL (pointing to a video on the local disk for example), the picker shares the content of the file. If the URL is remote, then the picker shares the URL instead of the contents.

---

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)