---
name: snap4id-try-example
description: Run the Snap4ID SDK's example partner app on an iOS simulator or Android emulator against the local fake Snap4ID page with the fake store (no account, no purchases), then point to onboarding for going live. Use when asked to try, demo or test Snap4ID locally, or before a partner id exists.
---

# Try Snap4ID locally, then go live

The example app runs on the user's machine as a development build (simulator / emulator; not Expo Go, not a store
download). Needs git, Node 22+, Xcode with a simulator or Android Studio with an emulator.

1. Clone and start the fake page (keep it running):
   `git clone https://github.com/lradomski10m/snap4id-sdk.git && cd snap4id-sdk && npm ci && npm run fake-page`.
   Ready at `http://127.0.0.1:8090`.
2. In a second terminal, `cd examples/partner-app` and run with these build settings (Metro inlines them, so they must
   be set on the command that starts Metro):
   - `APP_VARIANT=development` (dev client, local HTTP allowed)
   - `EXPO_PUBLIC_SNAP4ID_ORIGIN=http://127.0.0.1:8090` (iOS simulator) or `http://10.0.2.2:8090` (Android emulator)
   - `EXPO_PUBLIC_SNAP4ID_PARTNER_ID=test-verifier` (the page checks purchases) or `test-backend` (the partner's
     backend does: also start `examples/partner-backend` and set `EXPO_PUBLIC_SNAP4ID_PURCHASES=app`,
     `EXPO_PUBLIC_SNAP4ID_TRUST=backend`, `EXPO_PUBLIC_PARTNER_BACKEND_URL=http://127.0.0.1:8012`; see its README)
   - `EXPO_PUBLIC_SNAP4ID_TEST_STORE=1` (the fake store's "Test purchase" alert)

   then `npx expo run:ios` or `npx expo run:android` (first build: several minutes). A phone on the same network:
   `FAKE_SNAP4ID_HOST=0.0.0.0 npm run fake-page`, origin = the computer's LAN address, build with `--device`.
3. Walk the flow: **Get your photo** → **Create job** → **Process** → **Request purchase** → **Buy** → **Complete** →
   **Back to app** (scroll down). The order appears in **My photos**. Kill the app after **Buy** and relaunch: the
   photo still arrives. Automated: `npm run --workspace examples/partner-app e2e:fake-page:ios` (Maestro).
4. To run in the user's own app instead, use the skill `snap4id-integrate-embed` (its dev-only fake-store file).
5. Going live: the user needs a partner id from Snap4ID onboarding (write to service@snap4.id; docs page
   `/go-live/onboarding/`). They send bundle id / package name, product ids (one consumable per store), who checks
   purchases and, for that choice, the Play licensing public key or their Ed25519 public key; they get back the
   partner id (and a key id when they check). Then remove the fake store, leave `origin` unset (`https://snap4.id`)
   and follow `/go-live/checklist/`.

Never put private keys, store secrets or a fake-store build into a release.
