Class

NSSharingServicePicker

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

Overview

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.

Topics

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.

Relationships

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 NSSharingServiceDelegate

A set of methods that you use to customize the position and animation of a share sheet, and to be notified whether the item is successfully shared.

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.