All skills
swiftGii
Register a macOS File Handler
Make a macOS app open a file type by default, from Info.plist declaration to the launch-time file-open handler.
Published by Gii0 installsv1.0.05 KBUpdated Aug 13, 2026
Register a macOS app as a handler for a file type so users can set it as the default and double-clicking opens the file. Covers CFBundleDocumentTypes in Info.plist, implementing application open urls, the launch-before-bootstrap deferral problem, and lsregister to make Launch Services notice the new type after install. Includes an Info.plist snippet.
SKILL.md
| name | macos-file-handler |
|---|---|
| description | Register a macOS app as a handler for a file type such as Markdown, so it appears in Finder's Open With menu and can be set as the double-click default. Covers CFBundleDocumentTypes in Info.plist, choosing the right LSHandlerRank, implementing application(_:open:), buffering opens that arrive before app state exists, and refreshing Launch Services. Use when Finder does not offer your app for a file type, or when double-clicking launches it without opening the file. |
Changelog
Initial release.