# Lynx

> Identify devices in Lynx apps on iOS and Android through a native module over the Fingerly mobile SDKs.

Last updated: 2026-09-17

`@fingerly/lynx` is a Lynx native module over the [iOS](https://docs.fingerly.io/docs/sdks/ios) and [Android](https://docs.fingerly.io/docs/sdks/android) SDKs, with the same TypeScript API as [React Native](https://docs.fingerly.io/docs/sdks/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

```bash Terminal
pnpm add @fingerly/lynx
```

### Step 2: Enable Lynx Native Library Autolink

On Android, apply `org.lynxsdk.library-settings` in `settings.gradle` and `org.lynxsdk.library-build` in your app module. On iOS, add the `cocoapods-lynx-library` plugin to your Podfile, call `use_lynx_library!`, then run `pod install`.

### Step 3: Rebuild the host app

The module is registered at build time.

## Identify a device

```ts src/fingerly.ts
'background only'
import { load } from '@fingerly/lynx'

const fingerly = await load({ apiKey: 'fly_pk_us_production_…' })
const result = await fingerly.identify({ tag: 'checkout' })

// Send result.requestId to your backend and make the decision there.
```

> **Note:** Call the SDK from background-thread scripting. The module is marked `'background only'`.

## API

`load({ apiKey, endpoint?, consent? })`, `identify({ tag?, submit? })`, `collect()`, `setConsent(state)` and `nativeVersion()` behave as in the [React Native SDK](https://docs.fingerly.io/docs/sdks/react-native#api). Errors are `FingerlyError` with an optional HTTP `status`; without consent they are `ConsentError`.

## 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.
