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

# Tappd Mobile SDK for React Native — iOS and Android

> A React Native library for iOS and Android that tracks user behavior, manages sessions, and collects rich customer data across your mobile app.

The Tappd Mobile SDK is a React Native library that lets you track user behavior, manage sessions, and collect customer data across iOS and Android apps. Drop it into any React Native project and get full visibility into how users interact with your app — from first open to every screen view and custom event — without writing boilerplate infrastructure code.

## Supported Platforms

The SDK supports the following environments:

* **iOS** 12 and later
* **Android** API level 21 and later
* **React Native** 0.60 and later

## Key Features

<CardGroup cols={2}>
  <Card title="Automatic Session Management" icon="clock" href="/mobile-sdk/configuration">
    Time-based sessions with a configurable inactivity timeout. New sessions start automatically when users return after a period of inactivity.
  </Card>

  <Card title="Anonymous User Tracking" icon="user-secret" href="/mobile-sdk/getting-started">
    Track users before they identify themselves. When they log in, the SDK automatically merges anonymous data with their profile.
  </Card>

  <Card title="Auto Screen Tracking" icon="mobile-screen" href="/mobile-sdk/react-navigation">
    Record screen views automatically with React Navigation support, including time-on-screen duration.
  </Card>

  <Card title="Manual Event Tracking" icon="bolt" href="/mobile-sdk/api-reference">
    Fire custom events anywhere in your app — purchases, button clicks, form submissions, or any action that matters to your business.
  </Card>

  <Card title="In-App Messages" icon="message" href="/mobile-sdk/in-app-messages">
    Display banners, popups, and modals using native React Native components, triggered by user behavior or campaigns.
  </Card>

  <Card title="App Lifecycle Tracking" icon="arrows-rotate" href="/mobile-sdk/configuration">
    Automatically capture foreground, background, open, and close events without any extra code.
  </Card>

  <Card title="Deep Link & UTM Tracking" icon="link" href="/mobile-sdk/getting-started">
    Track deep links and UTM parameters to measure the effectiveness of your marketing campaigns.
  </Card>

  <Card title="Comprehensive Device Info" icon="microchip" href="/mobile-sdk/getting-started">
    Capture platform, OS version, and device details automatically. Pair with `react-native-device-info` for richer data.
  </Card>

  <Card title="Screen Duration Tracking" icon="stopwatch" href="/mobile-sdk/react-navigation">
    Measure exactly how long users spend on each screen to identify engagement patterns.
  </Card>

  <Card title="Push Notification Support" icon="bell" href="/mobile-sdk/push-notifications">
    Register push tokens and manage notification subscriptions with built-in FCM and APNs support.
  </Card>
</CardGroup>

## Installation

Install the SDK and its required peer dependency using npm or Yarn.

<CodeGroup>
  ```bash npm theme={null}
  npm install @tappd/mobile-sdk @react-native-async-storage/async-storage
  ```

  ```bash yarn theme={null}
  yarn add @tappd/mobile-sdk @react-native-async-storage/async-storage
  ```
</CodeGroup>

### iOS Setup

After installing, link the native dependencies for iOS by running CocoaPods.

```bash theme={null}
cd ios && pod install
```

### Android Setup

Android requires no additional setup. The SDK uses React Native's built-in APIs and works out of the box after the npm install.

### Optional: Device Info Package

Install `react-native-device-info` to capture richer device metadata such as device model, manufacturer, and app version.

<CodeGroup>
  ```bash npm theme={null}
  npm install react-native-device-info
  ```

  ```bash yarn theme={null}
  yarn add react-native-device-info
  ```
</CodeGroup>

<Note>
  After installing `react-native-device-info`, run `cd ios && pod install` again to link the iOS native module.
</Note>

## Quick Example

Here's what a minimal integration looks like after installation.

```javascript theme={null}
import TappdSDK from '@tappd/mobile-sdk';

const tappd = new TappdSDK({
  appId: 'YOUR_APP_ID',
  apiUrl: 'https://sdk.gotappd.com/api/v1/sdk'
});

// Identify a user when they log in
await tappd.identify({
  external_id: 'user_123',
  email: 'john@example.com',
  name: 'John Doe'
});

// Track a screen view
await tappd.trackScreen('HomeScreen');

// Track a custom event
await tappd.track('button_click', { buttonId: 'signup' });
```

## What to Read Next

<CardGroup cols={2}>
  <Card title="Getting Started" icon="rocket" href="/mobile-sdk/getting-started">
    Follow the step-by-step quickstart to install, initialize, and verify the SDK in your React Native project.
  </Card>

  <Card title="Configuration" icon="sliders" href="/mobile-sdk/configuration">
    Explore every configuration option and learn how to set up environment-based configs.
  </Card>

  <Card title="Push Notifications" icon="bell" href="/mobile-sdk/push-notifications">
    Register push tokens and manage FCM and APNs subscriptions.
  </Card>

  <Card title="In-App Messages" icon="message" href="/mobile-sdk/in-app-messages">
    Set up banners, popups, and modals driven by your Tappd dashboard campaigns.
  </Card>
</CardGroup>
