Licensing Guide

Amore's licensing system lets you issue, activate, and validate license keys for your macOS app. Customers purchase a license through a Stripe-powered checkout, receive their key via email, and activate it in your app.

For a complete working reference, see the Pomodoro example project, a simple SwiftUI app that integrates both Sparkle updates and AmoreLicensing end-to-end.

Overview

There are 4 steps to set up licensing:

  1. Create a product
  2. Connect Stripe
  3. Integrate the AmoreLicensing SDK
  4. Share your checkout link

Create a Product

A product defines what you're selling and how licenses behave — the name, device limit, and duration.

You can create a product from the Licensing screen in Amore by clicking New Product.

Learn more about Product Settings

Connect Stripe

Amore uses Stripe to process payments and manage subscriptions. You'll need to add your Stripe secret key and set up a webhook so Amore can issue licenses automatically when a purchase completes.

Learn more about Licensing Settings

Integrate AmoreLicensing SDK

Add the AmoreKit Swift package to your project:

.package(url: "https://github.com/AmoreComputer/AmoreKit", from: "1.0.0"),

Add AmoreLicensing as a dependency to your target:

.product(name: "AmoreLicensing", package: "AmoreKit")

Initialize

Create an AmoreLicensing instance with your public key. You can find the integration code snippet in Licensing Settings.

import AmoreLicensing

let licensing = try AmoreLicensing(
    publicKey: "your-public-key",
    bundleIdentifier: "com.example.myapp"
)

The bundleIdentifier parameter defaults to Bundle.main.bundleIdentifier if omitted.

Activate and Deactivate

try await licensing.activate(licenseKey: "XXXX-XXXX-XXXX")
try await licensing.deactivate()

Check Status

AmoreLicensing is @Observable, so you can use status directly in SwiftUI views:

switch licensing.status {
	case .valid(let license):
	    // License is active
	case .gracePeriod(let license):
	    // Expired but within grace window
	case .invalid:
	    // Invalid or revoked
	case .unknown:
	    // No license stored
}

For the full API reference, see the AmoreLicensing documentation. For a working SwiftUI integration that gates the UI on licensing.status, see the Pomodoro example.

Each product has a checkout link available in Product Settings. Share this link on your website, in your app, or anywhere your customers can find it. If you use the checkout link, your customers will automatically get redirected to an Amore-hosted success page showing them their freshly issued license key and information about their purchase.

In addition to the success webpage, after each successful purchase, your customers will receive their license key via email.