> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datalyr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install in a mobile app

> Track app sessions, screens, users, and campaign journeys.

Mobile apps use a native SDK. Do not load the web snippet inside the app as a replacement for an SDK.

## Choose the SDK

* Use the [iOS SDK](/sdk-reference/ios) for native Swift apps.
* Use the [React Native SDK](/sdk-reference/react-native) for React Native and Expo.
* Add the [Web SDK](/getting-started/install-web-tracking) too when campaigns land on a website before the app store.

## Setup order

<Steps>
  <Step title="Add the package">
    Follow the package-manager instructions in the SDK reference and use the workspace ID from **Settings → Install**.
  </Step>

  <Step title="Initialize once">
    Initialize near application startup, before tracking screens or product events. Do not initialize again on every view.
  </Step>

  <Step title="Track navigation">
    Send a screen event when the visible screen changes. React Native apps should use the documented React Navigation or Expo Router integration.
  </Step>

  <Step title="Identify after sign-in">
    Use the same stable user ID used by your backend and billing provider.
  </Step>

  <Step title="Test a clean install journey">
    Launch a development build, open a screen, identify a test user, and trigger one product event.
  </Step>
</Steps>

## What to verify

Open **Events** and confirm the app session, screen, identity, and custom event use the expected source and identifiers. Open **Users** and verify those events belong to one test customer.

If you use RevenueCat or Superwall, pass the Datalyr identity fields using the SDK helper documented for your platform. This is what lets subscription events join the app journey.

## Common failures

* **No events:** initialization did not run, the workspace ID is wrong, or the app was not rebuilt after installation.
* **Duplicate screens:** both automatic navigation tracking and manual screen tracking are enabled.
* **Revenue is unassigned:** the app user ID and billing-provider identity were never connected.
* **Only development works:** the production target is missing the package or initialization configuration.

Continue with the [mobile use case](/use-cases/mobile) for web-to-app attribution, subscriptions, and campaign setup.
