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

# sharingServicePicker(_:delegateFor:)

Asks your delegate to provide an object that the selected sharing service can use as its delegate.

```
optional func sharingServicePicker(_ sharingServicePicker: NSSharingServicePicker, delegateFor sharingService: NSSharingService) -> (any NSSharingServiceDelegate)?
```

## Parameters

`sharingServicePicker`

The sharing service picker.

`sharingService`

The selected sharing service.

## Return Value

An object that adopts the [`NSSharingServiceDelegate`](/documentation/AppKit/NSSharingServiceDelegate) protocol.

## Discussion

The sharing service assigns the returned object to its [`delegate`](/documentation/AppKit/NSSharingService/delegate) property.

---

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)