Writing a UserDefaults editor with SwiftUI and property wrappers

May 4, 2020

I've been talking a lot online about how useful SwiftUI has been in building debug components for Fluency - debug menus are one of the places where you can start using SwiftUI right now..

Read more

Implementing Amplitude analytics in a macOS app

April 19, 2020

I've been moving towards Amplitude for analytics in my personal apps, since it seems to have the best user experience and easiest itegration vs Google Analytics and Mixpanel (plus, it has a free tier!), but I only recently implemented analytics in a macOS app...

Read more

NSTextStorage: Crash in didProcessEditing

February 22, 2020

When you're writing an editor, a common feature is to intercept the user's typing and automatically edit the text, to make writing easier. For example, if we're typing in a list, we might want to automatically insert another bullet point when the user presses enter...

Read more

Processing shift-tab (backtab) events in NSTextView

February 21, 2020

I'm writing a Mac App which includes an NSTextView. One of the things I found difficult to discover online is how to respond to when the user presses shift-tab while editing in the text view - I wanted to intercept this event to de-indent a list item...

Read more

ImportError: No module named zlib on macOS Catalina

November 22, 2019

A few times now, I've had to get around an issue that happens on macOS Catalina where you try to run a Python script and it fails with an import error...

Read more