Part 4 of a series on building a native Razer mouse controller for macOS.

The protocol works from a command line tool. Now I want it living in the menu bar: a little mouse icon, click it, set DPI and color, no Terminal. SwiftUI has MenuBarExtra for exactly this, so it should be quick.

It was not quick. Three separate things broke, none of them about the mouse. This is the part where the OS fights you.

The Crash Before Anything Renders

The starting point. An accessory app (menu bar only, no Dock icon) usually sets that with: