Friday, October 11, 2024

Using NSDockTilePlugIn

Mario Guzmán (Mastodon):

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 NSDockTilePlugIn protocol.

The name of the plugin is indicated by a NSDockTilePlugIn 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 setDockTile(_:) is invoked, passing an NSDockTile for the plug-in to customize. If the principal class implements dockMenu() it is invoked whenever the user causes the application’s dock menu to be shown.

[…]

It is rare to see apps use NSDockTilePlugIn because apps that contain one are not allowed on the Mac App Store.

Previously:

3 Comments RSS · Twitter · Mastodon


That App Store restriction is a killer. It's why Nova uses a dock tile plugin but Transmit and Prompt do not.


Óscar Morales Vivó

Positively ancient API, and sad that Apple hasn't bothered building a proper, safe plugin API for dock tiles in nearing 25 years.


At first my reaction was, “do they want people to use the Mac App Store or not?” But after the comment above it makes more sense. It seems they’re instead using it to take the “easy” way out of security issues by just disallowing entire categories.

Still though, the system is capable of the things they disallow, so what really is the message they are sending? They don’t even seem to defend the Mac App Store as much as they do the iOS store. It’s not clear to me how Apple themselves sees the purpose of the MAS anymore.

Leave a Comment