You built a Mac app, you want to sell it outside the App Store, and now you need licensing: a key the customer enters, an activation that sticks, and feature gates that hold up offline. Here's how to do it in an afternoon without standing up a backend.

Note: this is cross-posted from the Keylight blog. I build Keylight, so this uses it as the worked example — the shape of the solution applies whatever SDK you choose.

The three things licensing actually has to do

Strip away the marketing and every licensing system does exactly three jobs:

Activate — turn a key the user pastes in into proof-of-purchase bound to this device.