<!--
{
  "availability" : [
    "macOS: 10.8.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSharingService/perform(withItems:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSharingService(im)performWithItems:"
  },
  "title" : "perform(withItems:)"
}
-->

# perform(withItems:)

Manually performs the service on the provided items.

```
func perform(withItems items: [Any])
```

## Parameters

`items`

The items to share.

## Discussion

In most cases this will display a sharing window.

## See Also

[`canPerform(withItems:)`](/documentation/AppKit/NSSharingService/canPerform(withItems:))

Returns whether the service can share all the specified items.



---

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)