LicenseKit helps you protect your software with commercial licenses on all major Apple platforms (iOS, macOS, tvOS, watchOS, and visionOS).
LicenseKit licenses can specify and validate expiration date, platform, bundle ID, tier, environment, features, and much, much more.
LicenseKit has different services that can validate code-based licenses, read licenses from files, validate licenses from remote APIs, integrate with services like Gumroad, etc.
LicenseKit lets you cache validation results to handle temporary connectivity loss, and use service proxying to use multiple services to validate license keys.
LicenseKit can be installed with the Swift Package Manager:
https://github.com/Kankoda/LicenseKit.git
LicenseKit only has to be added to the main app target. If you are using LicenseKit with a library, make sure to set up your Swift package so that your users get both your library and LicenseKit when fetching your package.
LicenseKit provides a bunch of license-specific features:
- ✅ License Validation - LicenseKit can validate licenses in many ways.
- ⌨️ Binary Licenses - LicenseKit lets you define licenses with source code.
- 📄 File-Based Licenses - LicenseKit lets you define licenses with plain text files.
- 🌩️ API/Cloud-Based Licenses - LicenseKit can validate licenses with web requests.
- 💰 Gumroad - LicenseKit can integrate directly with Gumroad.
- 📦 License Caching - LicenseKit can cache successful license validations.
- ➡️ Service Proxying - LicenseKit can chain multiple services together.
In LicenseKit, a LicenseEngine
is used to manage your product licenses, with one or several validation services.
Use your LicenseKit license key to create a LicenseEngine
, then define which license service to use.
Here, we use the "FREE" license key to create an engine that uses a .binary
service with two hard-coded licenses:
let engine = try await LicenseEngine(licenseKey: "FREE") {
.binary(
licenses: [
License(licenseKey: "license-key-1"),
License(licenseKey: "license-key-2")
]
)
}
You can choose from many different service types, such as .binary
, .file
, .api
, .gumroad
, .cached
, and .proxy
to create a service configuration that suits your needs.
See the getting-started guide for more information.
LicenseKit requires a commercial license to be used. It's free to start using and affordable to scale.
You can purchase a license or try out the free, unlimited trial from the LicenseKit website.
The online documentation has articles, code examples etc. that let you overview the various parts of the library.
The demo app lets you try out the library on iOS and macOS. Just open and run the Demo
project.
LicenseKit is handled by Kankoda:
Reach out if you have any questions or need help any way.
LicenseKit is closed source. See the LICENSE file for more info.