6

Open source libraries for building menu bar Mac apps

 3 years ago
source link: https://www.jessesquires.com/blog/2020/04/07/libraries-for-building-menu-bar-mac-apps/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

07 Apr 2020

software-dev    apps, github, macos, open-source

I’ve been working on two small libraries for building menu bar Mac apps and now they are both open source with initial 1.0 releases.

The first is StatusItemController, which encapsulates all of the basic setup and functionality required for working with your menu bar app. It owns an NSStatusItem and takes care of a lot of boilerplate. Think of it as a “view controller” for NSStatusItem.

The second is AboutThisApp, which provides a standard, customizable “About This App” panel. AppKit provides a default “About This App” panel via NSApp.orderFrontStandardAboutPanel(), but customization is limited, so I made this component as a drop-in replacement. By design, it’s very similar to what you get by default in a regular Mac app about panel, but you can more easily customize the content and UI styles.

Both of these components are used in my apps, Lucifer and Red Eye. In fact, these apps are the reason I made these two components. After writing the same code twice, I extracted these two libraries so I could use them again and reduce the maintenance burden for the app codebases.

If you are interested, check them out. Contributions are welcomed.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK