Building a Menu Bar App for macOS

Hacking@Home
2 min readJan 23, 2019

--

I recently started wondering about the development process for building basic macOS applications in Swift. Turns out it isn’t really that hard!

Thanks to the folks at RayWenderlich.com we all have great examples and tutorials across a range of topics. I followed this particular tutorial to learn the process of building a basic menu bar application. I did have to make a few corrections on the syntax for Swift 4, but that was pretty easy to workaround.

The result was a basic menu popover app that shows one quote from an array of quotes provided.

You simply press the button and it pulls the next quote in the array. Once it reaches the end of the array, it loops back and starts at the first quote again.

Feel free to fork my repo and use however you want. You can find it here: https://github.com/DanBurkhardt/MacMenuQuoteApp

Now, my next challenge will be to tie the actions of this menu item to some bash scripting that I want to run under the hood for a *top secret* app idea I’ve been kicking around for a while 😏.

--

--