<!--
{
  "availability" : [
    "macOS: 10.8.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSharingServiceDelegate/sharingService(_:willShareItems:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSSharingServiceDelegate(im)sharingService:willShareItems:"
  },
  "title" : "sharingService(_:willShareItems:)"
}
-->

# sharingService(_:willShareItems:)

Invoked when the sharing service will share the specified items.

```
@MainActor optional func sharingService(_ sharingService: NSSharingService, willShareItems items: [Any])
```

## Parameters

`sharingService`

The sharing service.

`items`

The items being shared.

## Discussion

---

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)