Production Licenses

Ship Primordial with offline-first licensing.

Create a signed license for your registered apps, bundle it with your release, and let the SDK verify production access on device and retrieve replacements for expired licenses.

Create a license

  1. Open your app in the developer console.
  2. Add the exact, case-sensitive app identifier for every platform you distribute.
  3. Open the Licenses tab and create the production license.
  4. Download Primordial.license and keep the original file unchanged.

A production license currently lasts 60 days and includes a 7-day grace period. It unlocks all SDK features in production for the registered app identifiers.

Add the license to an Apple app

  1. Drag Primordial.license into the Xcode project.
  2. Enable your app target under Target Membership.
  3. Confirm the file appears in the target's Copy Bundle Resources phase.
  4. Activate Primordial before using an SDK feature.
import Primordial

let primordial = PrimordialClient()
let status = try await primordial.activate(.license(.bundled("Primordial.license")))

print(status.isActivated)

Activation is fully local while the license is active. When it expires and enters its 7-day grace period, the SDK requests and verifies the latest signed license. For a license stored outside the app bundle, pass .license(.file(fileURL)) instead.

Keep app identifiers in sync

The license covers every identifier currently registered for the app. Adding or removing an identifier automatically creates a replacement license.

Existing apps keep their current license until it expires. At renewal, the SDK receives the latest registered identifiers. You do not need to publish an app update only because identifiers or the license changed. The same file can cover multiple registered platforms.

Already-distributed copies of an older offline license cannot be changed remotely. They remain valid for their original identifiers until that license and its grace period expire.

Renew or revoke

The SDK requests a new license when renewal is needed. The existing license remains usable through its 7-day grace period when the device is temporarily offline. Revocation prevents future renewal, but cannot remotely disable an offline copy before its signed expiry and grace deadline.

If you remove every app identifier, the current production license is revoked. Add an identifier again before creating another license.

Before archiving

  • Confirm the release bundle identifier exactly matches a registered identifier.
  • Confirm the bootstrap Primordial.license is in the app target.
  • Run a Release or Archive build and verify production activation on a supported device.
  • Test one online activation and one offline activation before release.