Get started

Quickstart

From zero to a verified purchase in four steps — nothing to deploy.

1. Create an app

Sign in at keywarden.dev, create an app and enter its Android package name and/or iOS bundle ID. Keywarden generates the app's signing key pair; you will pin its public half in the SDK.

$ kw login
$ kw apps create --name "My App" --android-package com.example.app
created  slug=my-app  pk_live_…  public key (SPKI) MFkwEwYHKoZI…

2. Connect your store

Upload a Google Play service account (needs View financial data) or an App Store Server API key (.p8). Map each product ID to an entitlement such as pro. Then copy two values from the app page (or kw apps show my-app): the public API key (pk_…) and the signing public key (SPKI, base64) you will pin in the app.

3. Add the SDK

// build.gradle.kts
implementation("dev.keywarden:keywarden-core:1.0.0")
implementation("dev.keywarden:keywarden-play-billing:1.0.0")
// Package.swift
.package(url: "https://github.com/dikeckaan/keywarden-swift",
         from: "1.0.0")   // products: Keywarden, KeywardenStoreKit

4. Ask for an entitlement

The SDK syncs with the server, verifies the signed bundle against your pinned public key and answers offline afterwards. Three outcomes, never a lockout: granted, rejected (the store said no), unknown (network — keep what you have).

Keywarden.get().has("pro")        // Android
Keywarden.shared.has("pro")       // Swift