LicenseKit is a Swift SDK that lets you protect your apps and SDKs with commercial licenses on all Apple platforms (iOS, macOS, tvOS, watchOS & visionOS).
LicenseKit can define licenses with code, generate and parse encrypted license files, read licenses from plain CSV files, integrate with external APIs, etc. It also has a pre-defined Gumroad integration.
LicenseKit requires a commercial license to be used. It's free to start using, and affordable to scale. You can sign up for a license or try out a free, unlimited trial from the LicenseKit website.
LicenseKit can be installed with the Swift Package Manager:
https://github.com/Kankoda/LicenseKit.git
LicenseKit only has to be linked to the main target. If you use LicenseKit with a Swift package, make sure to set up your package as described in the online documentation.
With LicenseKit, your app/library should create a LicenseEngine with your LicenseKit license key, then define which service type you want to use to use to fetch customer licenses:
let licenseEngine = try await LicenseEngine(
licenseKey: "your-license-key",
licenseStore: .myInternalLicenseStore // optional
licenseService: { yourLicense in
.api(...) // or...
.binary(...) // or...
.csvFile(...) // or...
.encryptedFile(...) // or...
.gumroad(...) // etc...
}
)There are many services to choose from, as described in the license services article. You can define licenses with source code, read licenses from file, fetch licenses from an API, integrate with services like Gumroad, etc.
Once you have a license engine instance, you can use it to resolve and validate licenses for your product, by letting your customers enter their license key. See the getting-started guide for more information.
LicenseKit provides you with services, integrations and apps that make it easy to manage licenses.
LicenseKit services make it easy to define, fetch, and validate licenses in different ways, for instance:
- 🌩️ API Integrations - LicenseKit can integrate with any REST API.
- 🌩️ Gumroad - LicenseKit can integrate directly with Gumroad.
- ⌨️ Binary Licenses - LicenseKit lets you define licenses with source code.
- 📄 CSV Files - LicenseKit lets you define licenses with plain CSV files.
- ⌨️ License Files - LicenseKit lets you define licenses with source code.
LicenseKit has SwiftUI-based apps that can be used directly from within Xcode Previews or embedded in an app:
- 💻 License Manager - Inspect a collection of licenses and license services.
The online LicenseKit documentation has articles, code examples, etc. to get you started. See the Understanding Licenses and Understanding License Services articles for more information.
The demo app lets you try out the library on iOS and macOS. Just open and run the Demo project.
LicenseKit is property of Kankoda:
Reach out if you have any questions, want to sign up for a license, or need help in any way.
LicenseKit is closed source. See the LICENSE file for more info.