{"id":11759,"library":"react-native-adjust","title":"Adjust React Native SDK","description":"The `react-native-adjust` package provides the official React Native SDK for Adjust, a mobile app attribution and analytics platform. It enables developers to track installs, events, sessions, and deep links across iOS and Android applications, providing insights into user acquisition campaigns and in-app behavior. The current stable version is `5.5.0`, with frequent updates that typically mirror the underlying native Adjust iOS and Android SDKs. This ensures compatibility with the latest Adjust backend features and OS-level changes. Key differentiators include robust fraud prevention, granular attribution reporting, and seamless integration with the Adjust dashboard for comprehensive analytics, making it a critical tool for mobile marketers and app developers focused on growth and measurement.","status":"active","version":"5.5.0","language":"javascript","source_language":"en","source_url":"git://github.com/adjust/react_native_sdk","tags":["javascript","react-native","ios","android","adjust","typescript"],"install":[{"cmd":"npm install react-native-adjust","lang":"bash","label":"npm"},{"cmd":"yarn add react-native-adjust","lang":"bash","label":"yarn"},{"cmd":"pnpm add react-native-adjust","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency for any React Native module.","package":"react-native","optional":false}],"imports":[{"note":"The primary SDK class is a default export.","wrong":"import { Adjust } from 'react-native-adjust';","symbol":"Adjust","correct":"import Adjust from 'react-native-adjust';"},{"note":"Configuration object is a named export. It's essential for SDK initialization.","wrong":"import AdjustConfig from 'react-native-adjust';","symbol":"AdjustConfig","correct":"import { AdjustConfig } from 'react-native-adjust';"},{"note":"Used for tracking custom in-app events. Ensure you import it as a named export.","wrong":"const AdjustEvent = require('react-native-adjust').AdjustEvent;","symbol":"AdjustEvent","correct":"import { AdjustEvent } from 'react-native-adjust';"},{"note":"Type definition for attribution callback data. Primarily used in TypeScript.","symbol":"AdjustAttribution","correct":"import { AdjustAttribution } from 'react-native-adjust';"}],"quickstart":{"code":"import Adjust, { AdjustConfig, AdjustEvent, AdjustLogLevel } from 'react-native-adjust';\n\nconst APP_TOKEN = process.env.ADJUST_APP_TOKEN ?? 'YOUR_ADJUST_APP_TOKEN';\nconst ENVIRONMENT = AdjustConfig.EnvironmentSandbox; // Use EnvironmentProduction for production\n\nconst config = new AdjustConfig(APP_TOKEN, ENVIRONMENT);\n\n// Set up a log listener for debugging\nconfig.setLogLevel(AdjustLogLevel.Verbose);\nconfig.setLogDelegate((logLevel, message) => {\n  console.log(`[Adjust Log] ${AdjustLogLevel[logLevel]}: ${message}`);\n});\n\n// Set an attribution listener\nconfig.setAttributionCallbackListener((attribution) => {\n  console.log('Attribution changed:', attribution);\n});\n\n// Initialize the SDK\nAdjust.create(config);\n\n// Track an event after SDK initialization\nconst trackPurchaseEvent = (amount: number, currency: string) => {\n  const event = new AdjustEvent('YOUR_EVENT_TOKEN'); // Replace with your event token\n  event.setRevenue(amount, currency);\n  event.setTransactionId('ORDER_XYZ_123'); // Optional: Add transaction ID\n  Adjust.trackEvent(event);\n  console.log(`Tracked purchase event: ${amount} ${currency}`);\n};\n\n// Example usage:\ntrackPurchaseEvent(19.99, 'USD');\n\nAdjust.getAdidWithTimeout(5000) // Get ADID with a 5-second timeout\n  .then((adid) => {\n    console.log('Adjust ADID (with timeout):', adid);\n  })\n  .catch((error) => {\n    console.error('Failed to get ADID with timeout:', error);\n  });\n","lang":"typescript","description":"Initializes the Adjust SDK, sets up logging and attribution callbacks, and demonstrates tracking a custom event and retrieving the ADID with a timeout."},"warnings":[{"fix":"Ensure `ENVIRONMENT` variable passed to `AdjustConfig` is correct for your build environment (e.g., via `__DEV__` or build flavors).","message":"Always use `AdjustConfig.EnvironmentProduction` for live applications and `AdjustConfig.EnvironmentSandbox` for development/testing. Mixing these can lead to inaccurate data.","severity":"gotcha","affected_versions":">=5.0.0"},{"fix":"Always check the official Adjust documentation and `react-native-adjust` release notes before upgrading native SDKs or `react-native-adjust` itself, especially across major versions. The changelog indicates `Adjust Signature library` updates, which, while internal, could imply breaking changes if not handled correctly by the wrapper.","message":"When upgrading Adjust native SDKs, especially across major versions, verify that the `react-native-adjust` package is also compatible. While `react-native-adjust` abstracts native changes, significant native API shifts might require an update to the React Native wrapper.","severity":"breaking","affected_versions":"Prior to 5.0.0 (and potentially future major releases)"},{"fix":"Update TypeScript code to handle potentially `null` or `undefined` values for properties that are now marked as nullable in the type definitions.","message":"The `index.d.ts` file now explicitly indicates nullable types (e.g., in `AdjustAttribution`). TypeScript users might encounter stricter type checking for optional fields, requiring explicit null checks.","severity":"gotcha","affected_versions":">=5.4.1"},{"fix":"Upgrade to `react-native-adjust` v5.4.0 or higher to access `setStoreInfo`, Google ODM, and v5.5.0 or higher for timeout-based methods and `resolveLinkWithUrl`.","message":"New methods like `getAdidWithTimeout`, `getAttributionWithTimeout`, `resolveLinkWithUrl`, `setStoreInfo` and support for Google LVL/ODM have been added in recent versions. Developers intending to use these features must upgrade their SDK.","severity":"gotcha","affected_versions":">=5.4.0"}],"env_vars":null,"search_vec":"'5.5.0':58 'acquisit':46 'across':37 'adjust':1,9,18,68,79,101,128 'analyt':24,105 'android':40,71,127 'app':21,51,115 'applic':41 'attribut':22,94 'backend':80 'behavior':52 'campaign':47 'chang':86 'compat':75 'comprehens':104 'critic':109 'current':54 'dashboard':102 'deep':35 'develop':28,116 'differenti':88 'enabl':27 'ensur':74 'event':32 'featur':81 'focus':117 'fraud':91 'frequent':60 'granular':93 'growth':119 'in-app':49 'includ':89 'insight':43 'instal':31 'integr':98 'io':38,69,126 'javascript':122 'key':87 'latest':78 'level':85 'link':36 'make':106 'market':113 'measur':121 'mirror':64 'mobil':20,112 'nativ':3,8,15,67,125 'offici':13 'os':84 'os-level':83 'packag':10 'platform':25 'prevent':92 'provid':11,42 'react':2,7,14,124 'react-nat':123 'react-native-adjust':6 'report':95 'robust':90 'sdk':4,16 'sdks':72 'seamless':97 'session':33 'stabl':55 'tool':110 'track':30 'typescript':129 'typic':63 'under':66 'updat':61 'user':45 'version':56","created_at":"2026-04-19T13:39:39.446088+00:00","updated_at":"2026-04-19T13:39:39.446088+00:00","problems":[{"fix":"This issue was fixed in `v5.0.2`. Ensure you are on `v5.0.2` or higher. If it persists, try cleaning CocoaPods cache (`pod cache clean --all`), deleting `Podfile.lock` and `Pods` directory, then reinstalling pods (`pod install`).","cause":"Specific CocoaPods integration issues, often related to caching or incorrect project setup.","error":"Adjust.modulemap not found"},{"fix":"Ensure you are on `v5.1.0` or higher to fix background NPEs and `v5.0.4` or higher for `AdjustPlayStoreSubscription` type mismatches. Always add null/undefined checks for properties retrieved from Adjust callback objects, as some fields might legitimately be absent.","cause":"Occasional `NPE occurrences` (Null Pointer Exceptions) in native code were reported, especially when the app was entering the background, or `type mismatch` in `AdjustPlayStoreSubscription` fields.","error":"TypeError: Cannot read property 'PROPERTY_NAME' of null/undefined in Adjust SDK callbacks or data objects."},{"fix":"This issue was fixed in `v5.0.2`. Upgrade to `react-native-adjust` `v5.0.2` or newer to resolve this problem.","cause":"Occasional ANRs while reading install referrer from Shared Preferences during SDK initialization on Android.","error":"Application Not Responding (ANR) on Android during SDK initialization."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://adjust.com","github":"https://github.com/adjust/react_native_sdk","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/react-native-adjust","openapi_spec":null,"status_page":null,"smithery":null,"categories":["observability","data","communication","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-18","install_tag":null}}