Originally published on the PermitCore blog.
Unlike the iPhone, the Mac has always let developers sell software from their own website. Many well-known Mac apps are sold that way: a DMG on the developer's site, a checkout, a license key and an update framework. What has changed is how strict macOS has become about software from the internet. Since macOS Sequoia, an app that is not signed and notarized can no longer be opened with a simple Control-click, and the customer has to find an override in System Settings. For a paid app, that is a lost sale.
This guide is for indie developers and small studios who want to sell a Mac app directly in 2026 and 2027, instead of or next to the Mac App Store. It covers the whole path: Developer ID signing and notarization, the checkout with Stripe or Paddle, license keys and device activation with a stable Mac device ID, offline use with signed tokens, trials, Sparkle updates and paid upgrades, and refunds that turn the license off. Apple's rules were checked against Apple's own pages on 2 December 2026; the links are listed at the end. Nothing here is legal or tax advice.
Mac App Store or direct sales: commission, review rules, sandboxing and updates compared
Selling outside the Mac App Store is allowed and needs no permission from Apple, but it does need an Apple Developer Program membership for the Developer ID certificate and notarization. The two channels differ in more than the commission:
| Mac App Store | Direct (Developer ID) | |
|---|---|---|
| Commission | 15% in the Small Business Program (up to 1 million USD in proceeds a year), otherwise the standard rate | None to Apple; your payment provider's fees |
| Review | App Review against the App Review Guidelines | Notarization: an automated malware and code-signing check, not App Review |
| Sandbox | Required (guideline 2.4.5(i)) | Optional; the Hardened Runtime is required for notarization |
| Licensing | No license screen at launch, no license keys, no own copy protection (2.4.5(vi)) | Your own license keys, activation and trials |
| Updates | Only through the Mac App Store (2.4.5(vii)) | Your own updater, usually Sparkle |
| Tax, refunds, receipts | Apple | You, or your merchant of record |
| Upgrade pricing, volume and team sales | Limited to what in-app purchase offers | Whatever your checkout and license model support |
Direct sales give you the customer relationship, flexible pricing such as paid major upgrades and team licenses, and one license that can also unlock a Windows or iOS version. In exchange you take over everything Apple does in the store: signing, payment, tax, license delivery, updates and refunds. The rest of this guide goes through those parts in order.
Developer ID signing, hardened runtime and notarization: getting past Gatekeeper on macOS Sequoia and later
Gatekeeper checks software downloaded from the internet the first time it is opened. Apple's notarization page is direct about it: "Beginning in macOS 10.15, all software built after June 1, 2019, and distributed with Developer ID must be notarized." In August 2024 Apple announced that in macOS Sequoia "users will no longer be able to Control-click to override Gatekeeper when opening software that isn't signed correctly or notarized"; they have to go to System Settings > Privacy & Security instead. A notarized app opens with a normal first-launch dialog.
What notarization requires
- A Developer ID Application certificate. Only the Account Holder of the developer team can create it (cloud-managed certificates are also available to admins with the right role). You can have up to five. Use a Developer ID Installer certificate if you ship a
.pkg. Mac App Distribution, Apple Development and ad hoc signatures are not accepted for notarization. - Every executable signed, including helpers and embedded frameworks such as Sparkle, with a secure timestamp.
- The Hardened Runtime enabled, with only the exceptions your app really needs (for example JIT for an embedded JavaScript engine).
- No
com.apple.security.get-task-allowentitlement in the release build.
The easiest path is Xcode: Product > Archive, then Distribute App, choose Developer ID and upload; Xcode notarizes the archive and staples the ticket. For Electron, Qt, .NET, Unity, Godot or any scripted build, use the command-line tools. altool no longer works for notarization since 1 November 2023; use notarytool:
# 1. Sign nested code first, then the app: hardened runtime + secure timestamp. codesign --force --options runtime --timestamp \ --entitlements MyApp.entitlements \ --sign "Developer ID Application: Example Ltd (TEAMID1234)" MyApp.app # 2. Put the app in a disk image and sign the image. hdiutil create -volname "MyApp" -srcfolder dist/ -fs APFS -format ULFO -ov MyApp.dmg codesign --timestamp --sign "Developer ID Application: Example Ltd (TEAMID1234)" MyApp.dmg # 3. Store credentials once (app-specific password), then submit and wait. xcrun notarytool store-credentials "notary" --apple-id "you@example.com" --team-id TEAMID1234 xcrun notarytool submit MyApp.dmg --keychain-profile "notary" --wait xcrun notarytool log <submission-id> --keychain-profile "notary" notary-log.json # 4. Staple the ticket and check what Gatekeeper will see. xcrun stapler staple MyApp.dmg xcrun stapler validate MyApp.dmg spctl --assess --type open --context context:primary-signature --verbose MyApp.dmg Copy
Notarization usually finishes within minutes; Apple says 98 percent of software completes within 15 minutes, and asks you to keep it under 75 submissions a day. Always read the log, even when the status is Accepted, because it lists warnings that can become errors later. Stapling attaches the ticket so Gatekeeper can find it without a network connection. You cannot staple a ZIP file, only the items inside it, which is one reason a notarized and stapled DMG is the common download format.
Certificate expiry and revocation
Apple's Developer ID page explains what happens over time. If your app does not use a Developer ID provisioning profile, customers can keep downloading and running a build that was signed while the certificate was valid, even after the certificate expires; you only need a new certificate for new builds and updates. If your membership lapses, existing signed apps keep working, but you need an active membership to get a new certificate. A revoked certificate is different: apps signed with it can no longer be installed or launched. Keep the private key safe, preferably off your build server's shared disks.
Checkout and VAT for direct Mac sales: Paddle as merchant of record or your own Stripe account
Outside the Mac App Store you need a checkout that charges the right tax for every buyer. The two common setups:
- A merchant of record, such as Paddle, is the seller to your customer. Paddle says it calculates, collects and remits VAT, GST and sales tax, issues compliant invoices and handles refunds and chargebacks for the transaction.
- Your own Stripe account, where you are the seller and tax is your responsibility. Stripe Tax can calculate it, and for eligible accounts and digital products Stripe's Managed Payments can act as merchant of record.
The trade-offs are in merchant of record vs Stripe. In the PermitCore Store you connect your own Stripe or Paddle account. PermitCore takes no sales commission; provider fees apply. When the signed payment webhook arrives, PermitCore issues the license with the activation limit, node locking, expiry and feature flags you set on the product, and queues the order email. Keys are not sent in plain text by email: the order email links to the buyer's Store account, where the My Keys tab lists every license linked to their email, with the purchase date, expiry and activated devices. The customer signs in, verifies the purchase email and copies the key into your app. Setup steps are in the Store guide and selling software with Stripe or Paddle. If you still run a Lemon Squeezy store, read the Lemon Squeezy shutdown guide before 31 March 2027.
Host the notarized DMG on your own site or a CDN. The download itself can be public: the license, not the file, decides what the app unlocks. That also makes a free trial simple, because the same download works before and after purchase.
License keys and device activation on the Mac: a stable device ID without MAC addresses
Outside the Mac App Store, a license screen and key entry are normal and expected. The question is how to count devices so that one purchase is not shared across a whole office, without locking out a customer who reinstalls macOS.
The common choice on macOS is the hardware UUID that IOKit exposes as kIOPlatformUUIDKey on the IOPlatformExpertDevice registry entry. It belongs to the Mac, not to your app, so it stays the same when the customer deletes and reinstalls the app, and a new Mac has a new one. Do not send it raw: hash it together with your bundle identifier, so the value you store is specific to your app. Avoid network MAC addresses, which macOS randomizes on Wi-Fi and which are easy to change (see why MAC addresses are bad hardware IDs), and avoid serial numbers, which are more personal than you need. The general trade-offs are in device activation and hardware IDs.
A native Swift or SwiftUI app calls the PermitCore REST API directly with URLSession. Fetch a single-use nonce from GET /api/v1/nonce, call POST /api/v1/activate once per Mac, and call POST /api/v1/validate on later launches. Pass expectedProductId so a key for another product is rejected with WrongProduct, and send the app version so version limits apply. If the app is sandboxed, add the outgoing network connections entitlement (com.apple.security.network.client).
import CryptoKit import Foundation import IOKit let api = URL(string: "https://api.permitcore.dev/api/v1")! // Hardware UUID of this Mac, hashed with the bundle ID: stable across reinstalls, // different for every app, and the raw value never leaves the machine. func deviceId() -> String { let bundle = Bundle.main.bundleIdentifier ?? "com.example.myapp" var hardwareUUID = "" let service = IOServiceGetMatchingService(kIOMainPortDefault, IOServiceMatching("IOPlatformExpertDevice")) if service != 0 { if let value = IORegistryEntryCreateCFProperty(service, kIOPlatformUUIDKey as CFString, kCFAllocatorDefault, 0)?.takeRetainedValue() as? String { hardwareUUID = value } IOObjectRelease(service) } let digest = SHA256.hash(data: Data("\(bundle):\(hardwareUUID)".utf8)) return digest.map { String(format: "%02x", $0) }.joined() } func postJSON(_ path: String, _ body: [String: Any]) async throws -> [String: Any] { var request = URLRequest(url: api.appendingPathComponent(path)) request.httpMethod = "POST" request.setValue("application/json", forHTTPHeaderField: "Content-Type") request.httpBody = try JSONSerialization.data(withJSONObject: body) let (data, _) = try await URLSession.shared.data(for: request) return (try JSONSerialization.jsonObject(with: data) as? [String: Any]) ?? [:] } let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "" // Once per Mac, when the customer enters the key from their Store account. func activate(licenseKey: String, productId: String) async throws -> [String: Any] { let (nonceData, _) = try await URLSession.shared.data(from: api.appendingPathComponent("nonce")) let nonce = (try JSONSerialization.jsonObject(with: nonceData) as? [String: Any])?["nonce"] as? String ?? "" let name = Host.current().localizedName ?? "Mac" return try await postJSON("activate", [ "licenseKey": licenseKey, "nonce": nonce, "deviceId": deviceId(), "deviceName": name, "version": appVersion, "expectedProductId": productId]) // Check result["isValid"] and result["errorCode"]: "SeatsExhausted" -> show // "Manage devices"; "VersionBlocked" -> show the upgrade offer. } // Later launches: validate (no new seat) and keep result["offlineCacheToken"]. func validate(licenseKey: String, productId: String) async throws -> [String: Any] { try await postJSON("validate", [ "licenseKey": licenseKey, "deviceId": deviceId(), "version": appVersion, "expectedProductId": productId]) } Copy
If your Mac app is built with Electron, .NET, Python, Java, C++, Unity or Godot, PermitCore has SDKs for Node, .NET, Python, Java, C++, Unity and Godot, among others, that wrap the same calls. See POST /activate and POST /validate for every field and error code, and license checks at app startup for keeping the first launch fast.
Device limits and new Macs
Mac customers often use a desktop and a laptop, and replace them every few years. Set an activation limit that matches how people work, for example two or three Macs for a personal license, and let customers free a seat themselves. Every PermitCore tenant has a customer portal at /portal/{your-slug}, where a customer enters the key, sees the activated devices and removes the old one; you can require an email code before a device is removed (Professional plan and above). Store buyers can manage their devices in their Store account too. When activation returns SeatsExhausted, show a "Manage devices" button that opens the portal. The full flow is in transferring a license to a new computer.
Offline license validation on macOS: signed tokens, grace periods and clock checks
MacBooks spend a lot of time on planes, trains and hotel Wi-Fi. A paid app that locks itself when the network is down produces refund requests. Do not store a plain "isLicensed = true" flag in UserDefaults; it is a property list that any user can edit. Store something the app can verify.
In PermitCore you set offline grace days on the license. When the app validates online with its device ID, the response includes an offlineCacheToken: a pc_grace_v1 token signed with your tenant's ECDSA P-256 key. Its payload carries the product ID, a SHA-256 hash of the license key, the device ID, the license's feature flags and a signed validUntil time. Keep the token in the Keychain or your app's Application Support folder and, when the network or server is unavailable, verify it with your public key from GET /api/v1/{tenantSlug}/public-key. Compile that public key into the app; never read it from the cache or a network response. For customers who work fully offline, such as studios on air-gapped machines, an admin can issue a manual pc_offline_v1 token bound to one device for 1 to 365 days. Both are described in offline licensing and offline grace mode.
PermitCore signs the base64url payload string and sends a raw 64-byte r‖s signature, which is exactly what CryptoKit's P256.Signing.ECDSASignature(rawRepresentation:) expects, so no DER conversion is needed:
import CryptoKit import Foundation // SPKI base64 public key from /api/v1/{tenantSlug}/public-key, compiled into the app. let trustedPublicKey = "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..." func base64URLDecode(_ value: String) -> Data? { var b64 = value.replacingOccurrences(of: "-", with: "+").replacingOccurrences(of: "_", with: "/") b64 += String(repeating: "=", count: (4 - b64.count % 4) % 4) return Data(base64Encoded: b64) } func sha256Hex(_ value: String) -> String { SHA256.hash(data: Data(value.utf8)).map { String(format: "%02x", $0) }.joined() } func parseDate(_ value: String?) -> Date? { guard let value else { return nil } let formatter = ISO8601DateFormatter() formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds] if let date = formatter.date(from: value) { return date } formatter.formatOptions = [.withInternetDateTime] return formatter.date(from: value) } // Returns the verified claims, or nil (malformed, tampered, expired, other key or device). func verifyGraceToken(_ token: String, licenseKey: String, deviceId: String, productId: String) -> [String: Any]? { let parts = token.split(separator: ".", omittingEmptySubsequences: false).map(String.init) guard parts.count == 3, parts[0] == "pc_grace_v1", let keyData = Data(base64Encoded: trustedPublicKey), let key = try? P256.Signing.PublicKey(derRepresentation: keyData), let raw = base64URLDecode(parts[2]), raw.count == 64, let signature = try? P256.Signing.ECDSASignature(rawRepresentation: raw), key.isValidSignature(signature, for: Data(parts[1].utf8)), // the base64url payload string let json = base64URLDecode(parts[1]), let claims = (try? JSONSerialization.jsonObject(with: json)) as? [String: Any] else { return nil } let bound = claims["deviceId"] as? String ?? "" let nodeLocked = claims["nodeLocked"] as? Bool ?? true guard claims["isValid"] as? Bool == true, let validUntil = parseDate(claims["validUntil"] as? String), validUntil > Date(), claims["licenseKeySha256"] as? String == sha256Hex(licenseKey), (claims["productId"] as? String)?.lowercased() == productId.lowercased(), bound.isEmpty || bound.caseInsensitiveCompare(deviceId) == .orderedSame, !nodeLocked || (!bound.isEmpty && claims["deviceActivated"] as? Bool == true) else { return nil } return claims } Copy
- Pick the grace period on purpose. A laptop on a two-week trip needs more than a desktop in an office. A longer grace period also means an offline Mac learns about a refund later, because a token stays valid until its signed deadline.
- Check the clock. Token expiry is compared with the Mac's clock. Save the latest time you have seen and treat the cached token as unusable if the clock goes clearly backwards.
- Online rejections win. If the server says the license is revoked or expired, do not fall back to the cache. Use the cached token only when the server cannot be reached.
Signing and notarization do not stop someone from patching your binary on their own Mac; they stop modified copies from passing Gatekeeper as yours. Keep the license check simple and honest, and read what to do if your software is cracked before spending weeks on obfuscation.
Free trials for a downloaded Mac app
A direct download makes trials easy: the customer installs the full app and decides within a week or two. PermitCore licenses can be trial licenses with a set number of trial days; the validation response says whether a license is a trial and how many days remain, so the app can show an honest countdown and an upgrade button. The trial state lives on the server, not in a preferences file the customer can delete, and the paid license replaces the trial without a reinstall. The details are in adding a free trial license.
Updates with Sparkle: EdDSA signatures, notarized updates and paid major upgrades
Mac App Store apps get updates from the store; direct apps need their own updater, and for most native Mac apps that is Sparkle. Sparkle reads an appcast (an RSS feed) from the URL in SUFeedURL in your Info.plist, downloads the update and replaces the app. The project's own security advice is to serve updates over HTTPS, sign and notarize the app with Developer ID, and sign every update archive with Sparkle's EdDSA (ed25519) key:
- Run
generate_keysonce. It stores the private key in your login Keychain and prints the public key, which goes intoInfo.plistasSUPublicEDKey. - Put each new notarized and stapled DMG or ZIP in an updates folder and run
generate_appcast, which writes the appcast with signatures and delta updates. Notarize every update, like the first download. -
CFBundleVersionmust increase with every release; Sparkle compares it to decide what is newer. - Keep the EdDSA private key off the web server that hosts the appcast. Sparkle 2.9 and later can also verify signed feeds (
SURequireSignedFeed).
Paid upgrades and maintenance periods
Many Mac apps sell a perpetual license for one major version, or a license with a year of updates. Sparkle's sparkle:minimumAutoupdateVersion marks a release as a major upgrade, so it is never installed automatically and the user sees it as a separate decision. Two PermitCore license fields help on the licensing side:
- Version limits. A license can carry a minimum and maximum version. When the app sends its dotted numeric version with activate or validate, a license capped at 1.99 that is used with version 2.0 is answered with
VersionBlocked, and your app can show the upgrade offer instead of a generic error. - Maintenance date. A license can carry
maintenanceExpiresAt, returned in the validation response next to the license expiry. Your app or update logic uses it to decide which releases a customer is entitled to, for example to offer only updates released before that date. The fields are described in license controls.
How to combine a perpetual license with a limited update period is covered in perpetual fallback licenses and perpetual vs subscription licenses.
Refunds, chargebacks and subscriptions ending: revoking the Mac license automatically
When Apple sells the app, Apple handles refunds. When you sell it, a refund in your payment dashboard must also turn the license off, or every refund is a free copy. In the PermitCore Store, a fully refunded or lost-dispute order revokes its license automatically, and a subscription license is deactivated when the subscription ends. The next online validation fails, and an offline Mac stops when its grace token runs out. If your own backend keeps an account in sync, the signed license.revoked webhook tells it; verify the X-PermitCore-Signature header before trusting the body. Failed renewals and dunning are covered in revoking a license after a failed payment.
Test it before launch: buy in test mode, refund the order, and confirm the app shows the locked state after its next online check.
Selling in the Mac App Store and directly at the same time
Many developers do both: the Mac App Store for discovery and customers who prefer Apple's billing, and the website for upgrade pricing, team licenses and other platforms. The store build has to follow the store rules. Guideline 2.4.5 says Mac App Store apps "may not present a license screen at launch, require license keys, or implement their own copy protection" and "must use the Mac App Store to distribute updates". In practice that means two build configurations: the direct build with Sparkle and the license screen, and the store build with in-app purchase and neither of those. A compile-time flag keeps both in one project.
The direct license is also the natural link to your other platforms. In PermitCore, a license belongs to a product, and activation works the same way on any device that calls the API. Use one product across platforms, pass the same expectedProductId from the Mac, Windows and mobile builds, and let the activation limit count devices across all of them. The iPhone side is in selling iOS app unlocks through your own web checkout, Android in selling an Android app outside Google Play, and desktop licensing in general in software licensing for desktop applications.
Launch checklist for a directly sold Mac app
- Sign every executable with a Developer ID Application certificate, a secure timestamp and the Hardened Runtime; remove
get-task-allow. - Notarize with
notarytool(or Xcode), read the log, staple the ticket to the DMG, and test the download on a clean Mac with Gatekeeper at its default setting. - Connect Stripe or Paddle to your Store, set the activation limit, node locking, offline grace days and feature flags on the product, and run a test purchase.
- Use a hashed hardware UUID as the device ID, activate once per Mac, validate on later launches, and pass
expectedProductIdand the app version. - Cache the signed
offlineCacheToken, verify it with a public key compiled into the app, and never store an editable "licensed" flag. - Link "Manage devices" to the customer portal from the license window and from...