@fingerly/lynx is a Lynx native module over the iOS and Android SDKs, with the same TypeScript API as React Native.
Requirements
- Lynx 4.1 on iOS 13 or Android 6.0 (API 23) or newer.
- HarmonyOS, Web and Lynxtron hosts are not supported.
Install
Step 1: Add the package
pnpm add @fingerly/lynxStep 2: Enable Lynx Native Library Autolink
On Android, apply
org.lynxsdk.library-settingsinsettings.gradleandorg.lynxsdk.library-buildin your app module. On iOS, add thecocoapods-lynx-libraryplugin to your Podfile, calluse_lynx_library!, then runpod install.Step 3: Rebuild the host app
The module is registered at build time.
Identify a device
'background only'
import { load } from '@fingerly/lynx'
// consent: 'granted' only once you have consent (or another lawful basis)
const fingerly = await load({ apiKey: 'fly_pk_production_…', consent: 'granted' })
const result = await fingerly.identify({ tag: 'checkout' })
// Send result.requestId to your backend and make the decision there.
API
load({ apiKey, endpoint?, consent? }), identify({ tag?, submit? }), collect(), setConsent(state) and nativeVersion() behave as in the React Native SDK, with consent defaulting to pending. Errors are FingerlyError with an optional HTTP status; without consent they are ConsentError.
Deleting the stored identity
'background only'
import { deleteStoredIdentity } from '@fingerly/lynx'
await deleteStoredIdentity()
Deletes the install record the native SDK keeps on the device, including the install ID the server recognises it by, for erasure requests and account deletion. It needs no load and no consent, sends nothing, and resolves once no record remains, including when there was none. It rejects with a FingerlyError when the delete fails. The next identification made with consent starts a new install ID; to stop identifying as well, set consent to 'denied' first. On iOS the record survives the app being deleted, so this is the only way to remove it. See account deletion and erasure.
Verdicts
| Verdict | Platform | What it means |
|---|---|---|
instrumentation | Both | An instrumentation toolkit is attached to the app. |
mitm | Both | Something is intercepting the app's encrypted traffic. |
automation | Both | A debugger or a test runner is driving the app. |
tampering | Both | The app's code has been hooked or modified. |
farm | Both | The device looks mass-provisioned or freshly reset. |
jailbreak, simulator | iOS | Jailbroken device; iOS Simulator. |
root, emulator, appCloner | Android | Rooted device; emulator; cloning framework. |
Verdicts a platform cannot answer are returned as { value: false, confidence: 'low', reasons: [] }, so the shape is the same on both.