Protocol

NSDock​Tile​Plug​In

The NSDock​Tile​Plug​In protocol defines the methods implemented by plug-ins that allow an application’s Dock tile to be customized while the application is not running.

Overview

Customizing an application’s Dock tile when the application itself is not running requires that you write a plug-in. The plug-in’s principal class must implement the NSDock​Tile​Plug​In protocol.

The name of the plugin is indicated by a NSDock​Tile​Plug​In key in the application's Info.plist file.

The plugin is loaded in a system process at login time or when the application tile is added to the Dock. When the plugin is loaded, the principal class' implementation of set​Dock​Tile(_:​) is invoked, passing an NSDock​Tile for the plug-in to customize. If the principal class implements dock​Menu() it is invoked whenever the user causes the application's dock menu to be shown. When the dock tile is no longer valid (for example,. the application has been removed from the dock) -set​Dock​Tile(_:​) is invoked with nil.

Symbols

Setting the Dock Tile

func set​Dock​Tile(NSDock​Tile?)

Invoked when the plug-in is first loaded and when the application is removed from the Dock.

Getting the Dock Tile Menu

func dock​Menu()

Invoked when the user causes the application's dock menu to be shown.

Relationships

Inherits From