Try it now, no account
Documents @snap4id-sdk/app-embed 1.0.0
The SDK’s example app runs on your machine: a development build in the iOS simulator or the Android emulator (not Expo Go, not a download from a store). It opens a fake Snap4ID page that runs next to it and buys with a fake store: no Snap4ID account, no store account, no real purchase.
You need git, Node 22 or later, and Xcode with a simulator (macOS) or Android Studio with an emulator.
1. Start the fake Snap4ID page
Section titled “1. Start the fake Snap4ID page”git clone https://github.com/lradomski10m/snap4id-sdk.gitcd snap4id-sdknpm cinpm run fake-page # http://127.0.0.1:8090; leave it running2. Run the example app
Section titled “2. Run the example app”In a second terminal, from the same checkout:
cd examples/partner-appAPP_VARIANT=development \EXPO_PUBLIC_SNAP4ID_ORIGIN=http://127.0.0.1:8090 \EXPO_PUBLIC_SNAP4ID_PARTNER_ID=test-verifier \EXPO_PUBLIC_SNAP4ID_TEST_STORE=1 \npx expo run:iosAndroid emulator: EXPO_PUBLIC_SNAP4ID_ORIGIN=http://10.0.2.2:8090 and npx expo run:android. The first build takes
several minutes.
A phone on the same network works too, with a development build installed from your computer (npx expo run:android --device, or npx expo run:ios --device with your Apple signing team): start the page with
FAKE_SNAP4ID_HOST=0.0.0.0 npm run fake-page and use your computer’s LAN address as the origin:
http://<LAN address>:8090.
3. Buy a photo
Section titled “3. Buy a photo”Tap Get your photo. On the fake page: Create job → Process → Request purchase, choose Buy in the “Test purchase” alert, then Complete and Back to app (scroll down to it). The order is in My photos with its files. Kill the app right after Buy and start it again: the photo still arrives (recovery).
More (your own store code, your own backend with partner test-backend, a Maestro UI test): the example’s
README. The same setup in your
own app: fake store.
