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

# Installation

> Add the ClickTerm React Native SDK to your Expo or bare React Native app.

The ClickTerm React Native SDK (`@clickterm/react-native-sdk`) is an Expo Module that wraps the native iOS and Android Clickterm SDKs so React Native apps — Expo or bare — can present clickwrap dialogs without writing custom native bridges.

<Note>
  **Latest SDK versions:** Web `2.4.0` · Android `2.3.0` · React Native `0.3.0` — [View changelog](/dev/resources/changelog)
</Note>

## Requirements

* React Native `0.75+` or Expo SDK `52+`
* iOS `15.0+`
* Android `minSdk 24`

## Install the package

```sh theme={null}
npm install @clickterm/react-native-sdk
```

## Expo apps

Add the SDK to your app's `plugins` array in `app.json` so Expo CLI and EAS Build pick it up during prebuild:

```jsonc app.json theme={null}
{
  "expo": {
    "plugins": ["@clickterm/react-native-sdk"]
  }
}
```

The plugin is a no-op shim today, but listing it follows the conventional Expo install path that `npx expo prebuild` and EAS Build expect. After updating `app.json`, run:

```sh theme={null}
npx expo prebuild
```

EAS Build picks up the plugin automatically.

## Bare React Native apps

After installing the package, install the iOS CocoaPods:

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

<Info>
  The iOS `ClicktermSDK.xcframework` is **not** bundled in the npm package — it's
  downloaded automatically from the ClickTerm CDN during `pod install`, with a
  best-effort prefetch right after `npm install` on macOS. There's no manual fetch
  step. If the download ever fails (offline, restricted CI, or a CDN hiccup),
  `pod install` stops with an actionable message — restore connectivity and re-run
  it, or fetch the framework manually with `npm run fetch:xcframework`.
</Info>

No additional steps are required for Android — the native dependency is resolved automatically from Maven Central.

## Initialize the SDK

Once the package is installed, initialize it as early as possible in your app — typically in the root component or app entry point:

```ts theme={null}
import * as Clickterm from '@clickterm/react-native-sdk';

await Clickterm.initialize('YOUR_CLICKTERM_APP_ID');
```

Get your App ID from the [Integrations page](https://app.clickterm.com/integrations) in the ClickTerm Dashboard.

<Warning>
  Never expose your **App Key** in client-side code. The App Key is used
  only for backend verification calls. The client SDK uses only the **App ID**.
  Store the App Key safely — it won't display again after creation, but can be
  regenerated. Regenerating the key requires updating your backend configuration.
</Warning>

## Requirements for showing a clickwrap

* The template must be **Enabled** in the dashboard
* The template must have at least one published content version in the **Effective** state

## Next steps

<CardGroup cols={2}>
  <Card title="ClicktermClient" icon="gear" iconType="light" href="/dev/sdk/react-native/clickterm-client">
    SDK initialization.
  </Card>

  <Card title="ClicktermDialog" icon="window-maximize" iconType="light" href="/dev/sdk/react-native/clickterm-dialog">
    Showing clickwrap dialogs and accepted content.
  </Card>
</CardGroup>
