Protocol

NSServicesMenuRequestor

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

Declaration

protocol NSServicesMenuRequestor

Overview

This informal protocol consists of two methods, writeSelection(to: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) -> Bool

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.

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.