Blog

LicenseKit 0.3 is out
Nov 8, 2022 releases

LicenseKit 0.3 is out with a few new features, like a new proxy service and a free license that lets you use LicenseKit for free.

Free license

If you use “FREE” as license key when creating a license engine, you will register a free license that is capped to a small number of local or file-based licenses.

let engine = try LicenseEngine(licenseKey: "FREE") { license in
    // Set up a license service here 
}

This makes it possible to use LicenseKit for free, for as many apps and libraries as you need, until you need more licenses or more powerful features.

License service proxy

There’s a new LicenseServiceProxy that can be used to combine multiple license services, for instance to handle local, file-based and remote licenses with a single service.

let engine = try LicenseEngine(licenseKey: "your-license-key") { license in
    LicenseServiceProxy(
        services: [
            CsvLicenseService(
                license: license,
                fileName: "licenses",
                fileExtension: "csv"
            ) { rows in
                rows.map {
                    License(licenseKey: row[0])
                }
            },
            LocalLicenseService(
                license: license,
                licenses: [
                    License(licenseKey: "license-key-1"),
                    License(licenseKey: "license-key-2")
                ]
            )
        ]
    )
}

In the code above, we create a proxy that first tries to find a license in a csv file. If this doesn’t work, it will then try to find a match in a hard-coded set of licenses. If both fails, it will throw an error.

Download

LicenseKit 0.3 can be fetched from GitHub and licenses purchased from Gumroad.