Building a paid MacOS app often means you need a way to verify license keys, prevent piracy, and give customers a simple way to manage their access. In this guide, you'll learn how to set up license key validation and activation in a Swift-based MacOS app using Keyforge.
We'll also cover how to integrate payments through Stripe and how to let users manage their licenses through the customer portal.
When a user launches your app for the first time (or when no license key is stored), prompt them to enter their license key. Send it to the Keyforge API to activate the license on that device.
You can automatically generate licenses when a customer buys your app on Stripe. Check out the Stripe integration guide to set this up.
The Stripe integration works with both one-time payments and subscriptions. For recurring payments, licenses automatically expire or renew based on the customer's subscription status.
If your app needs to run without internet access, Keyforge supports offline license tokens. These are signed JSON Web Tokens (JWTs) that can be verified locally without contacting the server. Protecting your app even without an active connection. Learn more.
You've now implemented a full licensing system in your Swift MacOS app using Keyforge, from activation and validation to payments and customer self-service. This setup helps protect your app while providing a smooth experience for users, whether they're online or offline.