Protocol

NSServicesMenuRequestor

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

Overview

This informal protocol consists of two methods, writeSelectionToPasteboard:types: and readSelection(from:). The first method provides data to a remote service, and the second receives any data the remote service might send back. Both respond to messages that are generated when the user chooses a command from the Services menu.

Topics

Working with Pasteboards

func readSelection(from: NSPasteboard)

Reads data from the pasteboard and uses it to replace the current selection.

Relationships

Inherits From

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.

class NSSharingServicePicker

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

protocol NSSharingServicePickerDelegate

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