4.0.0 introduces breaking changes that require manual migration. The new SDK aligns with the v4 event format and requires the New Architecture, renames provider and client APIs, flattens the response format, and uses a single identification error type. These structural API changes do not affect identification or Smart Signals accuracy.
What’s new
- The package is renamed from
@fingerprintjs/fingerprintjs-pro-react-nativeto@fingerprint/react-native, and the GitHub repository moved fromfingerprintjs/fingerprintjs-pro-react-nativetofingerprintjs/react-native. - The SDK now requires the New Architecture; the Old Architecture is no longer supported.
- The minimum supported versions are React Native 0.80 and Expo SDK 54, driven by the SDK’s move to React Native’s Strict TypeScript API.
- The API aligns with Server API v4: responses are flat and snake_case.
FingerprintJsProProvideris renamed toFingerprintProvider, andFingerprintJsProAgentis replaced by astart()function plus auseFingerprint()hook.useVisitorDatareturns a discriminated union,getDataalways throws on error, and a newimmediateoption (defaultfalse) enables immediate data fetching on mount.- Options are grouped by platform (
android,ios,web), andendpointUrl/fallbackEndpointUrlsare consolidated into a singleendpointsoption. - All ~28 error classes collapse into one
FingerprintError, discriminated witherror.codeand anisFingerprintErrortype guard. - The web target’s peer dependency changes from
@fingerprintjs/fingerprintjs-pro-spato@fingerprint/agent. - Experimental Swift Package Manager support is available for iOS linking, alongside CocoaPods.
- iOS 13 is no longer supported. Because the SDK requires React Native 0.80, the effective platform floors are iOS 15.1 and Android 7.0 (API level 24+).
Migration steps
The following section outlines the necessary migration steps to complete the transition from v3 to v4.Upgrade the package and enable the New Architecture
The package is renamed from@fingerprintjs/fingerprintjs-pro-react-native to @fingerprint/react-native. Remove the old package and install the new one at 4.0.0, and make sure your app runs React Native 0.80+ (or Expo SDK 54+) with the New Architecture enabled:
Platform minimum bumps
Raise your platform floors to match the v4 SDK. The floors below are the effective minimums: React Native 0.80 itself requires iOS 15.1 and Android API level 24, so your app cannot target lower versions even where the native SDKs allow it.
Update your
ios/Podfile platform target and android/build.gradle minSdkVersion accordingly.
FingerprintJsProProvider renamed to FingerprintProvider
FingerprintJsProAgent replaced by start() and useFingerprint()
The class-based agent is replaced by a start() function that synchronously returns a client with a single, asynchronous get() method. getVisitorId() and getVisitorData() are removed. Inside a component tree wrapped in FingerprintProvider, use the new useFingerprint() hook instead of constructing a client directly.
useVisitorData behavior changes
useVisitorData now returns a discriminated union ({ data, isLoading, isFetched, error, getData }), getData always throws instead of accepting throwOnError, and a new immediate option (default false) was introduced. Set it to true to fetch the data immediately on mount.
Options grouping and endpoint consolidation
Platform-specific options are now grouped underandroid, ios, and web keys, and endpointUrl/fallbackEndpointUrls are consolidated into a single endpoints option. extendedResponseFormat is removed; v4 always returns the flat response.
Response fields
Renamed
Added
Removed
The following fields, and theextendedResponseFormat flag that enabled them, are no longer part of the response:
Errors
All ~28 v3 error classes collapse into a singleFingerprintError with { name, code, event_id }, plus an isFingerprintError(error) type guard. Discriminate on error.code, a string union open to unknown values, instead of instanceof checks against specific error classes.
error.code values are lower snake_case and are the same on iOS, Android, and web; they are grouped into server/API v4 codes and client-side codes. Handle the ones you care about and fall back to generic handling for the rest. For the full list of web codes, see JavaScript agent error handling.
Web peer dependency
If your app also targets web, swap the peer dependency from@fingerprintjs/fingerprintjs-pro-spa to @fingerprint/agent: