Mobile apps and SDKs (beta)
Get a session ID from your iOS, Android or React Native app; your server calls POST /v1/assess as usual. Prove that requests come from your app with attestation.
Install the SDKs
// iOS 15+: the package in ios/
import Signet
let signet = SignetClient(siteKey: "pk_live_...", appId: "com.your.bundle", timeout: 3)
do {
let sessionId = try await signet.collect()
// POST sessionId to your server
} catch {
// continue checkout
}
// Android: sources in android/. Call off the main thread.
val signet = SignetClient(siteKey = "pk_live_...", appId = "com.your.package", timeoutMs = 3_000)
try {
val sessionId = signet.collect(context)
// POST sessionId to your server
} catch (e: Exception) {
// continue checkout
}
// React Native: the wrapper in react-native/. Link the native sources, then rebuild.
import { collect } from '@signetsentry/react-native';
const sessionId = await collect({ siteKey: 'pk_live_...', appId: 'com.your.app', timeoutMs: 3000 });
If the site key has an origin allow-list, add app:com.your.bundle or the package name, sent as X-Signet-App-Id or app_id. An empty list allows any app. On a timeout, continue and log it. Server helpers: Node, Python and PHP.
Settings and reason codes
The iOS, Android and React Native SDKs (beta) post to POST /v1/collect and return a session ID. Your server calls POST /v1/assess as usual.
| Setting | Value |
|---|---|
platform | ios, android or react_native |
| Origin allow-list | Add app:com.your.app and send X-Signet-App-Id. |
| Identifier | A random durable ID, optionally shared across your iOS apps. The SDKs also send identifierForVendor or a pseudonymized ANDROID_ID. They never read IDFA or AAID. |
| Timeout | About 3 s, so your flow never waits. |
| Reason code | Meaning |
|---|---|
EMULATOR_DETECTED | An emulator or simulator. Also used on the web. |
ROOTED_DEVICE, JAILBROKEN_DEVICE | The phone’s protections are removed. |
APP_INTEGRITY_FAILED | The app appears altered. Use attestation for proof. |
What they send
The SDKs never read IDFA or AAID, even with tracking consent.
| Category | Data |
|---|---|
| Identifiers | The durable ID below; identifierForVendor (iOS) or a hash of ANDROID_ID |
| Device | Model, operating system, screen, locale, platform |
| Integrity | Emulator, simulator, root and jailbreak signs; app_integrity; with attestation, an App Attest assertion or a Play Integrity token |
Durable ID
A random ID made on first run, sent as device.durable_id. It is hashed and unique to your account. A device Signet already knew keeps its visitor_id (match_type: "migrated").
| Topic | iOS | Android |
|---|---|---|
| Stored | On the device only, not backed up | On the device only, not backed up |
| After a reinstall | Can survive | Removed |
| Turn off | useDurableId: false | useDurableId = false |
| Delete | resetDurableId() | resetDurableId() |
| New phone | Does not follow | Does not follow |
It can outlast a reinstall on iOS. Say so in your privacy notice.
To share one ID across your iOS apps:
let signet = SignetClient(
siteKey: "pk_live_...",
appId: "com.your.bundle",
keychainAccessGroup: "ABCDE12345.com.your.shared" // $(AppIdentifierPrefix)com.your.shared
)
- In Xcode, add Keychain Sharing to each target with one group, such as
com.your.shared. Xcode writes thekeychain-access-groupsentitlement. - Sign every app with the same team. Pass the full group with the Team ID prefix.
- The first app makes the ID. An app without the group keeps its own.
Attestation
Proof that requests come from your genuine app. Turn it on with PUT /v1/attestation or in the dashboard.
| Platform | What you provide |
|---|---|
| Android, Play Integrity | An integrityToken function on SignetClient; the decryption and verification keys from Play Console, App integrity, Response encryption. Keys are write-only and kept for your account alone. |
| iOS, App Attest | useAppAttest: true; your Apple Team ID |
Android: Play Integrity
- In Play Console, App integrity, link a Google Cloud project.
- Under Response encryption, manage keys yourself. Copy both keys into Signet.
- Add
com.google.android.play:integrityand pass a token function.
val integrity = IntegrityManagerFactory.create(context)
val signet = SignetClient(
siteKey = "pk_live_...", appId = "com.your.package",
integrityToken = { nonce ->
Tasks.await(integrity.requestIntegrityToken(
IntegrityTokenRequest.builder().setNonce(nonce).setCloudProjectNumber(YOUR_PROJECT_NUMBER).build()
)).token()
},
)
iOS: App Attest
Set your Apple Team ID in Signet. Real devices only. While testing from Xcode, allow Apple’s development environment in settings.
let signet = SignetClient(siteKey: "pk_live_...", appId: "com.your.bundle", useAppAttest: true)
Modes
| Mode | Effect |
|---|---|
monitor | Adds the result to the score. |
enforce | Also refuses unverified mobile sessions: 403 attestation_failed. Browsers are not affected. |
Reason codes
| Code | Meaning |
|---|---|
ATTESTATION_FAILED | It did not verify. |
APP_NOT_RECOGNIZED | Google Play does not recognize this copy of the app. |
DEVICE_INTEGRITY_FAILED | The device fails Google’s check. |
ATTESTATION_MISSING | None was sent. |
Rules can read device.attestation (verified, failed, missing, not_configured) and device.attestation_reason.
Limits and errors
Beta: APIs may change. Test in your own app before you rely on them. Also the common errors.