Initializer

init(items:)

Initializes a new sharing service picker for the selected items.

Declaration

init(items: [Any])

Parameters

items

The items to be shared.

Return Value

A configured sharing service picker.

Discussion

The items represent the objects to be shared and must conform to the NSPasteboardWriting protocol, for example, NSString, NSImage, NSURL, etc. If the one of the items is an NSURL instance is a file URL (pointing to a video for example), then the content of the file will be shared. If the URL is remote, then the URL itself will be shared.