Skip to content

LicenseKit helps you protect your Swift-based apps and libraries with a commercial license.

License

Notifications You must be signed in to change notification settings

Kankoda/LicenseKit

Repository files navigation

LicenseKit Logo

Version Swift 5.9 Twitter: @kankodahq Mastodon: @kankoda@mastodon.social

About LicenseKit

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.

Installation

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.

Features

LicenseKit provides a bunch of license-specific features:

Getting started

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.

Pricing

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.

Documentation

The online documentation has articles, code examples etc. that let you overview the various parts of the library.

Demo Application

The demo app lets you try out the library on iOS and macOS. Just open and run the Demo project.

Contact

LicenseKit is handled by Kankoda:

Reach out if you have any questions or need help any way.

License

LicenseKit is closed source. See the LICENSE file for more info.