{"id":14978540,"url":"https://github.com/davidcann/electron-mac-dock-icon-switcher","last_synced_at":"2026-03-08T00:31:04.533Z","repository":{"id":206753198,"uuid":"717624275","full_name":"davidcann/electron-mac-dock-icon-switcher","owner":"davidcann","description":"Change your app's Dock icon on macOS, so it persists after your app quits.","archived":false,"fork":false,"pushed_at":"2025-03-08T05:44:38.000Z","size":119,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-02T09:49:42.906Z","etag":null,"topics":["electron","macos"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidcann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-12T03:12:19.000Z","updated_at":"2025-03-08T05:44:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"8882d135-8d0f-45d2-9ba0-891ba69f58b6","html_url":"https://github.com/davidcann/electron-mac-dock-icon-switcher","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"b1ced829c049cb0a9a534e19ede246878c8c10f0"},"previous_names":["davidcann/electron-mac-dock-icon-switcher"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidcann/electron-mac-dock-icon-switcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcann%2Felectron-mac-dock-icon-switcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcann%2Felectron-mac-dock-icon-switcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcann%2Felectron-mac-dock-icon-switcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcann%2Felectron-mac-dock-icon-switcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidcann","download_url":"https://codeload.github.com/davidcann/electron-mac-dock-icon-switcher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcann%2Felectron-mac-dock-icon-switcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30238836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:30:53.000Z","status":"ssl_error","status_checked_at":"2026-03-08T00:30:44.061Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","macos"],"created_at":"2024-09-24T13:57:52.421Z","updated_at":"2026-03-08T00:31:04.114Z","avatar_url":"https://github.com/davidcann.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-mac-dock-icon-switcher\n\n\u003e Change your app's Dock icon on macOS, so it persists after your app quits.\n\nYou should install this in `devDependencies` because you'll configure your build process to copy the built `.docktileplugin` bundle into a folder inside your app bundle. Because of this, the switching icons can only work with your production app, not when running with the electron binary used in development.\n\n#### Not allowed in Mac App Store\n\nLast I heard, Apple does not allow apps with a docktileplugin in the Mac App Store.\n\n## Install\n\n#### Xcode Requirements\n\nYou must have `xcodebuild` installed and working properly. It comes with Xcode, but if there's an error, you may need to run `sudo xcode-select --reset` or use the `-switch` argument to set the location of your Xcode tools.\n\n### 1. Install in `devDependencies`\n\n    npm install --save-dev electron-mac-dock-icon-switcher\n\n### 2. Set Variables in `.npmrc`\n\nYou must add the three variables in your app's `.npmrc` file. Each string **must be unique** to your app.\n\n- `dock_icon_notification_key` is used as the system-wide macOS notification key for the \"set\" icon action. It is typically a reverse dns style string.\n- `dock_icon_plugin_bundle_identifier` is used as the unique identifier of the plugin bundle. It is typically a reverse dns style string. Note that this should be different from your app's bundle identifier.\n- `dock_icon_class_name` is used as the class name of the plugin that is loaded by the dock. It is typically a camel case first-letter-capitalized string, with a prefix unique to the developer or your project.\n\nAn example `.npmrc` file:\n\n    dock_icon_notification_key=com.demo.docktile.set\n    dock_icon_plugin_bundle_identifier=com.demo.docktile.plugin\n    dock_icon_class_name=MyDemoDockTilePlugin\n\n#### Changing these variables after installing\n\nIf you change any of these values after running once, first rebuild dependencies with `npm rebuild`, then you'll also need to clear the dock's cache: Quit the app, remove it app from the dock, wait 5 seconds, then restart the `Dock` and `SystemUIServer` services:\n\n    sudo killall Dock\n    sudo killall SystemUIServer\n\n### 3. Build Phase Requirements\n\n1. Set `NSDockTilePlugIn` in your app's Info.plist\n2. Copy `DockTile.docktileplugin` bundle to your app's bundle in a folder called `PlugIns`\n\nHere's an example using `electron-forge` in your `forge.config.cjs` file:\n\n    module.exports = {\n    \textendInfo: {\n    \t\tNSDockTilePlugIn: \"DockTile.docktileplugin\",\n    \t},\n    \tpackagerConfig: {\n    \t\tafterComplete: [\n    \t\t\t(buildPath, electronVersion, platform, arch, callback) =\u003e {\n    \t\t\t\tif (platform == \"darwin\") {\n    \t\t\t\t\t// Copy the plugin to the app bundle\n    \t\t\t\t\tconst fs = require(\"fs\");\n    \t\t\t\t\tconst path = require(\"path\");\n    \t\t\t\t\tconst pluginPath = path.join(\n    \t\t\t\t\t\t__dirname,\n    \t\t\t\t\t\t\"node_modules\",\n    \t\t\t\t\t\t\"electron-mac-dock-icon-switcher\",\n    \t\t\t\t\t\t\"build\",\n    \t\t\t\t\t\t\"Release\",\n    \t\t\t\t\t\t\"DockTile.docktileplugin\"\n    \t\t\t\t\t);\n    \t\t\t\t\tconst pluginDest = path.join(\n    \t\t\t\t\t\tbuildPath,\n    \t\t\t\t\t\t\"MyApp.app\", // TODO: replace with your bundle name\n    \t\t\t\t\t\t\"Contents\",\n    \t\t\t\t\t\t\"PlugIns\",\n    \t\t\t\t\t\t\"DockTile.docktileplugin\"\n    \t\t\t\t\t);\n    \t\t\t\t\tfs.mkdirSync(pluginDest, { recursive: true });\n    \t\t\t\t\tfs.cpSync(pluginPath, pluginDest, { recursive: true, overwrite: true });\n    \t\t\t\t}\n    \t\t\t\tcallback();\n    \t\t\t},\n    \t\t],\n    \t}\n    \t...\n    }\n\n## Signing\n\nYou may need to sign the DockTile.docktileplugin bundle before distributing your app.\n\n**TODO**: add instructions for signing with `electron-forge`\n\n## Debugging\n\nBuild manually after checking out this repository:\n\n    npx run ./build.sh\n\nFixes some xcodebuild cli errors:\n\n    sudo xcode-select --reset\n\nCheck the plugin's binary to make sure your notification key is set correctly:\n\n    strings ./build/Release/DockTile.docktileplugin/Contents/MacOS/DockTile\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcann%2Felectron-mac-dock-icon-switcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidcann%2Felectron-mac-dock-icon-switcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcann%2Felectron-mac-dock-icon-switcher/lists"}