A list of sharing services from which the user can choose.


class NSSharingServicePicker : NSObject


The NSSharingServicePicker class presents a list of sharing services, so that the user can choose a service to share an item. When a service is chosen, the picker automatically executes it, which presents the sharing window.

The NSSharingServicePickerDelegate allows customizing the picker’s available services, where it appears, and allows assigning the delegate object for the NSSharingService delegate.


Creating a Sharing Service Picker

init(items: [Any])

Initializes a new sharing service picker for the selected items.

Display the Sharing Service Picker

func show(relativeTo: NSRect, of: NSView, preferredEdge: NSRectEdge)

Shows the picker, populated with sharing services related to the instance items.

Getting and Setting the Delegate

var delegate: NSSharingServicePickerDelegate?

Specifies the service picker delegate.


Inherits From

Conforms To

See Also

App Services

class NSSharingService

A service that lets users share content with other services, such as social media services, or apps, such as Mail and Safari.

protocol NSSharingServicePickerDelegate

A set of methods that you use to customize the service picker behavior.

protocol NSServicesMenuRequestor

A set of methods that support interaction with items users can share through a sharing service.

protocol NSCloudSharingServiceDelegate

A protocol that an iCloud-sharing service implements to handle status changes and errors.