Mobile SDKs
Embed Pact's consent-native CRM into your own iOS, Android, or React Native app. Native concurrency, offline writes, white-label theming, cost-transparent AI agent calls.
The Pact mobile SDKs let you build a CRM, marketing, or AI-agent feature
directly into your own app. There are three packages, all backed by the same
/v1/api/* REST surface and the /v1/events/* event stream:
| Platform | Package | Install | Source |
|---|---|---|---|
| JS / RN / Capacitor / Node | @pact/sdk-mobile | npm i @pact/sdk-mobile | packages/sdk-mobile |
| iOS / macOS (Swift) | PactSDK (SwiftPM) | Xcode ▸ Add Package Dependencies | packages/sdk-ios |
| Android / Kotlin | place.pact:pact-sdk | implementation("place.pact:pact-sdk:0.1.0") | packages/sdk-android |
Every SDK shares the same defaults so the same engineering reasoning applies on every platform:
- Consent-native by default. The server already filters reads against the
tenant's consent state; the SDK surfaces the
consent_filteredflag verbatim so your UI can tell users when a list is short on purpose. - BYOK respected. Agent calls fired through the SDK route to the tenant's
own LLM credentials when configured; the response carries
byok: trueandcost_cents: 0so the cost meter doesn't double-count. - Audit baked in. The SDK posts to
/v1/events/emiton every mutation so Wave AT downstream subscribers (webhooks, the deal-room compile, the in-tenant audit table) stay in sync without app code. - Cost transparent. Every billed call carries an
actual_cents,predicted_cents, anddrift_pctfield, sourced from PR #1327's cost predictor. The SDK exposes a singleonCosthook so you can render a per-screen meter without polling. - Offline-first writes. Mutations made offline are parked behind an idempotency key and replayed the moment the device is back online. Replays share the same key, so duplicates never land.
- White-label theming. A canonical
defaultTokensobject mirrors Pact's Wave V design tokens; pass tenant overrides toresolveTokens()/PactTheme.resolve(...)at app start so the embed picks up the host's brand colours.
Read the platform-specific pages for the install + first call + lifecycle
recipes. Every example below builds against the same live sandbox at
https://api.pact.place.
What you'll need
- A sandbox API key (
pact_test_...) for development, or a live key (pact_live_...) for production. Mint them under Settings ▸ Developers ▸ API keys. - The OAuth scopes you plan to use (
read:contacts,write:activities, …). The SDK doesn't add any; the server enforces every scope per request. - (Optional) A tenant-supplied
theme_overridesmap for white-label embeds.
Verifying
Once you have the SDK installed and a token wired, every entity helper returns
a typed envelope with data, cost, and consentFiltered. The cost block is
the truth meter: if it ever reads null after a billed call, the token is
unauthenticated or the call hit a stub.