{"id":45342,"date":"2024-10-11T15:53:55","date_gmt":"2024-10-11T19:53:55","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=45342"},"modified":"2024-10-11T15:53:55","modified_gmt":"2024-10-11T19:53:55","slug":"using-nsdocktileplugin","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/10\/11\/using-nsdocktileplugin\/","title":{"rendered":"Using NSDockTilePlugIn"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/marioaguzman\/NSDockTilePlugIn-Example\">Mario Guzm&aacute;n<\/a> (<a href=\"https:\/\/mastodon.social\/@marioguzman\/113252881260582131\">Mastodon<\/a>):<\/p>\n<blockquote cite=\"https:\/\/github.com\/marioaguzman\/NSDockTilePlugIn-Example\"><p>Customizing an application&rsquo;s Dock tile when the application itself is not running requires that you write a plug-in. The plug-in&rsquo;s principal class must implement the <code>NSDockTilePlugIn<\/code> protocol.<\/p><p>The name of the plugin is indicated by a <code>NSDockTilePlugIn<\/code> key in the application&rsquo;s Info.plist file.<\/p><p>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&rsquo; implementation of <code>setDockTile(_:)<\/code> is invoked, passing an <code>NSDockTile<\/code> for the plug-in to customize. If the principal class implements <code>dockMenu()<\/code> it is invoked whenever the user causes the application&rsquo;s dock menu to be shown.<\/p><p>[&#8230;]<\/p><p>It is rare to see apps use <code>NSDockTilePlugIn<\/code> because apps that contain one are not allowed on the Mac App Store.<\/p><\/blockquote>\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/11\/17\/big-sur-application-icons\/\">Big Sur Application Icons<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Mario Guzm&aacute;n (Mastodon): Customizing an application&rsquo;s Dock tile when the application itself is not running requires that you write a plug-in. The plug-in&rsquo;s principal class must implement the NSDockTilePlugIn protocol.The name of the plugin is indicated by a NSDockTilePlugIn key in the application&rsquo;s Info.plist file.The plugin is loaded in a system process at login time [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-10-11T19:53:59Z","apple_news_api_id":"f11879e2-2dab-41d6-bcb9-00e295d53f55","apple_news_api_modified_at":"2024-10-11T19:53:59Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A8Rh54i2rQda8uQDildU_VQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[69,1777,30,39,212,2598,74,71,901],"class_list":["post-45342","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-dock","tag-mac","tag-macappstore","tag-leopard","tag-macos-15-sequoia","tag-opensource","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/45342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=45342"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/45342\/revisions"}],"predecessor-version":[{"id":45343,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/45342\/revisions\/45343"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=45342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=45342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=45342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}