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 NSSharingServiceDelegate


See NSSharingService for more information.


Sharing Items

func sharingService(NSSharingService, willShareItems: [Any])

Invoked when the sharing service will share the specified items.

func sharingService(NSSharingService, didShareItems: [Any])

Invoked when the sharing service has finished sharing the items.

func sharingService(NSSharingService, didFailToShareItems: [Any], error: Error)

Invoked when the sharing service encountered an error when sharing items.

Customizing Transition Animation

func sharingService(NSSharingService, sourceFrameOnScreenForShareItem: Any) -> NSRect

Invoked when the sharing service is performed and the sharing window is displayed, to present a transition between the original items and the sharing window.

enum NSSharingService.SharingContentScope

The sharing scope constants specify the nature of the things you are sharing.


Inherits From

See Also

Sharing Items and Customizing the UI

var delegate: NSSharingServiceDelegate?

Specifies the delegate of the sharing service.