How to Add Licensing to a Mac App
You’ve built a Mac app, you’re selling it outside the App Store, and now it needs licensing. Keys, activations, trials, the works. The good news: this is a solved problem, and the fast path is genuinely fast. The trap is treating it as one job when it’s two.
The two jobs: payments and licensing
These get conflated constantly, so be clear about them up front.
Payments is taking the money — checkout, cards, refunds, and tax. Stripe, Paddle, Lemon Squeezy, Creem, Gumroad all do this.
Licensing is deciding who gets to run the app, on which machines, for how long — keys, device limits, offline checks, trials, feature tiers. That’s a different layer, and most payment platforms only fake it with a basic key.
Most paid Mac apps need both. The clean setup is one tool for each.
The fastest path: a payment provider + Keylight
The shortest route from “built” to “selling with real licensing” is a payment provider plus a licensing layer that’s already wired to it. With Keylight that’s your payment provider for the money and the Swift SDK for everything in the app.
Connect your payment provider. From then on, a payment mints the license automatically — Keylight catches the webhook and issues the key, you write no backend code. In the app, the SDK is a state machine. Activate a key once, check on launch, switch on the result:
import Keylight
let licensing = Keylight(publicKey: "pk_live_...")
// when the customer enters their key
try await licensing.activate(key: userEnteredKey)
// on every launch
await licensing.checkOnLaunch()
switch licensing.state {
case .licensed:
enablePaidFeatures()
case .trial(let daysLeft):
showTrialBanner(daysLeft: daysLeft)
case .expired:
showRenewalPrompt()
case .invalid:
showActivationSheet()
}
That’s the integration. The launch check runs offline — each license is an Ed25519-signed lease your app verifies locally with a bundled public key, so the app opens with no network. Device limits are enforced server-side. Feature flags ride in the lease, so you gate Pro offline. The full walkthrough lives in add license keys to a Swift macOS app.
Stripe is the first-class path — a charge mints the license with no webhook code. Other payment providers — Paddle, Lemon Squeezy, Creem, Gumroad — connect to Keylight by webhook.
What about rolling your own?
You can. The happy path — generate a key, check it against a database — is a weekend.
The rest isn’t. Offline verification that can’t be spoofed. Device-limit enforcement that survives a copied config file. Refunds and revocation. Trial states and grace windows. Key rotation. Clock tampering. Licensing servers that go down. Every one of those is a real bug class, and they’re the reason a licensing layer exists. Roll your own when licensing is the product you’re selling. Otherwise it’s a backend you’ll maintain forever to avoid a $19/month bill. More on that math in the hidden cost of “free” licensing.
The alternatives, briefly
Keylight is built for the Swift-first indie shipping on the Mac. It’s not the only option, so here’s the honest field — the full ranked version is in best licensing platforms for macOS apps:
- LicenseKit — an Apple-native Swift client SDK. Great if you want a pure SDK and already have a license source (Gumroad, your own API); you bring the backend.
- LicenseSeat — cross-platform with a Swift SDK, Ed25519 offline, processor-agnostic. Strong if you also ship games, plugins, or non-Apple builds.
- Keygen — a flexible, language-agnostic licensing API you wire yourself. Most control, most work.
- Gumroad / Lemon Squeezy / Creem — payment platforms with a basic key. Fine for a single download; thin once you need device limits, offline use, or trials.
- Keymint — solid for Electron, Tauri, Rust, and C# desktop apps, but no Swift SDK today.
How to choose
Quick version:
- Swift app, want it done with payments wired → Keylight.
- Want a pure Swift SDK on a source you already run → LicenseKit.
- Shipping across engines or platforms too → LicenseSeat.
- Want primitives and full control → Keygen.
- Just need a key emailed at checkout → a payment platform’s built-in key.
If you’re an indie shipping a Mac app and you want to spend your time on the app, not the licensing backend, the honest answer is Keylight — it’s the one built for exactly that.
Plans start at $19/month, with a free tier. Connect your payment provider, drop in the Swift SDK, ship. Got a licensing topic you’d like covered? Send us your feedback.
Frequently asked
What's the fastest way to add licensing to a Mac app?+
Use a processor for payments and a licensing layer for licenses. With Keylight that's: connect your payment provider, add the Swift SDK, call activate(key:) and checkOnLaunch(). A payment mints the license automatically, and the app verifies it offline on launch.
Do I need a backend to license a Mac app?+
Not if you use a hosted licensing layer. Keylight issues the keys, mints them on payment, and tracks device activations, so there's no backend to build. A client-only SDK like LicenseKit expects you to run the issuance backend yourself.
Can Mac App Store apps use license keys?+
No — App Store apps use StoreKit and in-app purchases, and can't ship their own license keys. License keys are for Developer ID apps sold outside the Mac App Store. If you sell direct, that's exactly the case for a licensing layer.
Should I just build my own licensing?+
You can, and the happy path is a weekend. The edge cases aren't: offline verification, device-limit enforcement, refunds and revocation, trial states, key rotation, clock tampering. That's the part a licensing layer exists to own.
Ready to ship?
Create your account and start licensing your apps in under a minute. Free forever tier included.
Start Free