---
title: "React Native SDK Setup: A Step-by-Step Guide (2026)"
description: "How to set up React Native today, start a project with Expo or the Community CLI, and add a native SDK like UXCam to your iOS and Android app."
url: https://uxcam.com/blog/react-native-sdk/
language: en-US
date_published: 2024-06-25T22:00:00.000Z
date_modified: 2026-10-30T00:00:00.000Z
---

# React Native SDK Setup: A Step-by-Step Guide

**React Native** is a framework, not an SDK: it lets you build iOS and Android apps with JavaScript and React. To start a new app, the React Native docs recommend a framework like Expo (npx create-expo-app@latest). Without one, you use the Community CLI. Third-party native SDKs, such as UXCam's react-native-ux-cam, install with npm and pod install, and in Expo they need a development build.

| Task | Command or step | Good to know |
| --- | --- | --- |
| New app with Expo | npx create-expo-app@latest | The default the React Native docs recommend |
| New app without a framework | npx @react-native-community/cli@latest init MyApp | react-native init is deprecated |
| Add a native SDK | npm install react-native-ux-cam, then pod install | UXCam needs iOS 12+ and Android API 21+ |
| Native SDKs in Expo | Use a development build or EAS Build | Expo Go can't load extra native code |
| Start UXCam | optIntoVideoRecording(), then startWithConfiguration() | Turn off automatic screen tagging |
| Verify the install | Look for "Verification successful" in Xcode or Logcat | These logs don't show in Metro |

If you're reading this, you're probably setting up React Native for the first time, or adding an SDK to an app that already exists. There's an even higher chance you've noticed that many tutorials are out of date. Some still use a project command React Native has deprecated, and many skip the native steps that decide whether an SDK actually works on iOS and Android.

**The good news:** This guide clears up what people mean by "React Native SDK" and shows how to start a project the way the React Native team recommends today. Then it walks through adding a third-party native SDK, from install to first verified session, using the UXCam React Native SDK as the example. [UXCam](https://uxcam.com/) records how people use your iOS and Android apps, and your website through its web SDK in the same account. By the end, you'll also have analytics running on the app you just built.

## What is the React Native SDK?

[React Native](https://reactnative.dev/) is an open-source framework from Meta for building iOS and Android apps with React. Strictly speaking, it's a framework rather than an SDK. Still, "React Native SDK" is a common search for two related things, and this guide covers both.

The first is React Native itself plus its tooling. That includes the Metro bundler that serves your JavaScript and the command-line tools that create and run projects. Underneath sit the platform SDKs: Xcode for iOS and the Android SDK for Android. Setting these up is the first half of this guide.

The second is a third-party SDK packaged for React Native. It's an npm package that ships JavaScript along with native iOS and Android code, such as an analytics, payments or push notification SDK. These need a few steps beyond npm install, because their native code has to be compiled into your app. The second half of this guide shows those steps with UXCam's SDK, and the same pattern applies to most native SDKs you'll add later.

## Who builds with React Native

React Native runs some of the most widely used apps in the world. The React Native team keeps a [showcase](https://reactnative.dev/showcase) of them, and here are a few examples from that list:

- **Meta** uses React Native across its products, including Facebook Marketplace, Facebook Ads Manager and the Meta Quest app.
- **Microsoft** builds parts of Office, Outlook, Teams and Xbox Game Pass with React Native, and uses it for desktop apps as well.
- [**Shopify**](https://www.shopify.com/) builds all of its mobile apps with React Native, including Shop and Shopify Point of Sale.
- **Amazon** uses it in apps such as Alexa, Amazon Photos and Kindle.

What these teams have in common is scale. They manage many screens, many releases and two platforms that have to stay in step, which is exactly where a shared codebase pays off.

## Why teams choose React Native

The main draw is one JavaScript or TypeScript codebase for iOS and Android. Your app still renders real native UI components, so it looks and feels native rather than like a web page in a wrapper. When you need platform-specific code, you can use platform-specific files or a Platform.OS check. Native modules cover anything the JavaScript layer can't reach.

Development is fast, too. Fast Refresh shows most code changes in the running app almost instantly, and teams with web experience can reuse what they know about React. The [New Architecture](https://reactnative.dev/architecture/landing-page), now the default, replaced the old asynchronous bridge with direct calls between JavaScript and native code. That makes native modules faster and lets libraries render native views more efficiently.

Then there's the ecosystem. Most analytics, payment, maps and messaging providers publish React Native SDKs. Frameworks like [Expo](https://docs.expo.dev/more/create-expo/) package routing, native APIs and build tooling, so you don't assemble them yourself. Before you add a library, check that it supports the New Architecture. UXCam's React Native SDK has done so since version 6.0.0.

## What you need before you start

React Native development needs Node.js, plus the native toolchain for each platform you target. For iOS, that means a Mac with Xcode and CocoaPods. For Android, you need Android Studio with the Android SDK and a Java Development Kit. Versions change with each React Native release, so follow the React Native [environment setup guide](https://reactnative.dev/docs/environment-setup) for your operating system rather than a version list in a blog post.

Expo lets you start with less. An Expo project can run on a physical device through a development build. Expo's cloud build service, [EAS Build](https://docs.expo.dev/build/introduction/), compiles the iOS and Android binaries for you. You'll still want Xcode or Android Studio for simulators and native logs, which you'll need later to verify an SDK.

## Step 1: Create a new React Native project

The React Native team now recommends starting new apps with a framework, and it names Expo as the one most developers benefit from. To create an Expo project, run npx create-expo-app@latest in your terminal and follow the prompts. Expo gives you file-based routing through Expo Router, a standard library of native modules and a build service. Without it, you'd assemble all of that yourself.

You can still use React Native without a framework. That makes sense if your app has constraints a framework doesn't serve well, or if you want to manage the native projects yourself. In that case, run npx @react-native-community/cli@latest init followed by your project name, as [Get Started Without a Framework](https://reactnative.dev/docs/getting-started-without-a-framework) describes. The old npx react-native init command is deprecated. If you installed a global react-native-cli package in the past, uninstall it first, because it can cause unexpected errors.

To run a Community CLI project, start Metro with npm start. Then build and launch the app with npm run android or npm run ios. For an Expo project, npx expo start runs the development server, and the terminal shows how to open the app on a simulator or device.

## Step 2: Understand how native SDKs plug into React Native

A pure JavaScript library works as soon as you install it. A native SDK is different. Its iOS and Android code has to be compiled into your app binary, which is why some libraries need a rebuild rather than a reload.

React Native handles most of the wiring through autolinking, built in since React Native 0.60. When you install a package that contains native code, autolinking adds it to your Android build and your iOS Podfile. On iOS, you then run pod install inside the ios folder to fetch and link the native dependencies. On Android, the next Gradle build picks them up.

Expo works the same way, with one important difference. Expo Go, the sandbox app for quick previews, ships a fixed set of native modules and can't load new ones. To use a native SDK in an Expo app, you build your own [development build](https://docs.expo.dev/develop/development-builds/introduction/), locally or with EAS Build. Some libraries also ship a config plugin that applies their native settings when you run npx expo prebuild.

## Step 3: Add the UXCam React Native SDK

UXCam's React Native SDK is the [react-native-ux-cam](https://github.com/uxcam/react-native-ux-cam) package. It records sessions on iOS and Android and captures taps, swipes and screens automatically. From that one integration you get session replay, heatmaps, funnels and crash context.

Check the requirements in the [React Native quick start](https://developer.uxcam.com/docs/quick-start-react-native) before you install. You need React Native 0.68 or later, or Expo SDK 47 or later. Your app needs an iOS deployment target of 12.0 and an Android minSdkVersion of 21 or higher. You also need a UXCam account with an app key.

1. **Install the package:** Run npm install react-native-ux-cam, or yarn add react-native-ux-cam if you use Yarn.
2. **Install the iOS pods:** Run pod install inside your ios folder to link the native iOS SDK into your Xcode project. Android needs no extra step, because autolinking adds the native Android SDK on the next build.
3. **On Expo, create a development build:** Install the EAS CLI and run eas build:configure. Then build a development client with eas build --profile development for iOS or Android. Install that build on your device or simulator, and start the dev server with npx expo start --dev-client. UXCam's [Expo installation guide](https://developer.uxcam.com/docs/expo-installation-react-native) walks through each command.

## Step 4: Initialize UXCam in your root component

Start UXCam once, when the app launches. The [React Native integration guide](https://developer.uxcam.com/docs/react-native) does this in a useEffect inside the root App component. Import RNUxcam from react-native-ux-cam. Turn on screen recording for iOS and Android with RNUxcam.optIntoVideoRecording(), then call RNUxcam.startWithConfiguration() with a configuration object.

The configuration object needs three settings. Set userAppKey to the app key from your UXCam dashboard. Set enableAutomaticScreenNameTagging to false, because React Native screens are better tagged from JavaScript, as the next step explains. And set enableImprovedScreenCapture to true, as the docs recommend. Crash handling is on by default, so you get native crashes, ANRs and UI freezes without any extra setting.

Treat app keys like other secrets. Use one key for development and another for production, load them from environment variables or your CI configuration, and keep them out of version control. Separate keys also keep your test sessions out of production data. While you develop, set enableIntegrationLogging to __DEV__, so the SDK logs its status in debug builds only.

## Step 5: Tag your screens

Screen names turn recordings into analysis. Heatmaps, screen statistics, funnels and journeys are all grouped by screen. In React Native, automatic screen tagging isn't reliable, because screens are JavaScript components that a navigation library swaps. That's why UXCam's [screen tagging guide](https://developer.uxcam.com/docs/screen-tagging-react-native) strongly recommends tagging screens yourself with RNUxcam.tagScreenName().

With React Navigation, call it inside a [useFocusEffect](https://reactnavigation.org/docs/use-focus-effect/) callback in each screen. You can also tag in one place, from the onStateChange callback of your NavigationContainer. Read the current route name from a navigation ref, and tag only when it changes. On Expo Router, tag from your root layout using the useSegments hook.

A few naming rules keep the data clean. Tag each tab and each modal as its own screen, and use human-readable names such as Checkout Payment. Keep IDs out of names, so one product page doesn't turn into thousands of screens.

## Step 6: Mask sensitive data

UXCam masks password fields that use secureTextEntry and standard credit card inputs automatically. Anything else that shows personal or sensitive data stays visible in recordings until you mask it, such as account numbers, addresses or health information. Masking runs on the device, so hidden content never reaches UXCam's servers.

You have three levels to choose from. Without any code, the Video Recording Privacy settings in the UXCam dashboard let you record, occlude or blur all screens or chosen ones. At startup, you can pass overlay or blur rules for named screens in the occlusions list of your configuration.

For single components, pass a component's ref to RNUxcam.occludeSensitiveView(), or wrap part of the layout in the UXCamOccludedView component. WebViews that show payment or health data are safest when you occlude the whole WebView. The [occlusion guide](https://developer.uxcam.com/docs/sensitive-data-occlusion-react-native) covers each option.

## Step 7: Verify the integration on both platforms

Run the app on a device or simulator and move through three or four screens for about 30 seconds. Then send the app to the background. That ends the session and starts the upload, and the session should appear in your UXCam dashboard within about a minute.

If you turned on integration logging, check the native logs: Xcode's console for iOS and Logcat in Android Studio for Android. These logs don't appear in Metro, VS Code or Cursor. "Verification successful" means the SDK started with a valid app key, and "Session uploaded" means the session reached UXCam. In the replay, check that every screen appears once with a duration above zero seconds, and that sensitive fields are masked.

A few problems come up often. If RNUxcam is null or undefined, the app is running in Expo Go, so switch to a development build. If an Expo build fails with a missing native module, run npx expo prebuild and rebuild. If no session appears, confirm the app key and make sure the app actually went to the background. The [troubleshooting guide](https://developer.uxcam.com/docs/troubleshooting-react-native-uxcam-react-native) covers the rest.

## Best practices once the SDK is live

Keep the SDK current. Each release of react-native-ux-cam updates the native iOS and Android SDKs underneath it and adds fixes, such as recent improvements to WebView capture. The [changelog](https://developer.uxcam.com/docs/react-native-changelog) lists them. Treat SDK updates like any other dependency: update on a branch, rebuild both platforms and run through a test session.

Test on more than your own phone. React Native layouts can behave differently across screen sizes, OS versions and low-end devices. Replays from real users show problems that never appear on a developer's device, and you can filter sessions by device, OS and app version to compare them.

Add context where autocapture can't infer it. Log custom events with RNUxcam.logEvent() for business moments such as purchase_completed. Identify logged-in users by passing your internal user ID to RNUxcam.setUserIdentity(). Log JavaScript errors as events from a global error handler, too, because UXCam captures native crashes automatically but JavaScript exceptions aren't native crashes. If you also run another crash reporter, such as Firebase Crashlytics, decide which one owns crashes and turn crash handling off in the other.

Then let the data come to you. [Tara](https://uxcam.com/ai/), UXCam's AI analyst, looks across your sessions and points out what changed and where users struggle. The replays show you why.

That's the loop teams use to fix real problems. [Costa Coffee](https://uxcam.com/case-study/costa-coffee/), for example, used funnels and custom events to find that about 15% of new users dropped off after entering an invalid password. After fixing the flow, it increased app registrations by 15%.

## From a new React Native project to your first recorded session

Setting up React Native today starts with a framework like Expo or, if you need full control, the Community CLI. The deprecated react-native init is no longer the way in. Adding a native SDK then comes down to the same few steps every time. Install the package and link the native code with pod install or a development build. Then initialize it once at the root of your app and verify it in the native logs on both platforms.

Add UXCam the same way, and you'll see how real users move through the app you just built. Your screens are tagged from your navigator, sensitive data is masked on the device and Tara points you to what's worth fixing. [Get started with UXCam](https://tara.uxcam.com/signup) and record your first React Native session in a few minutes.

FAQ

### Is React Native an SDK or a framework?

React Native is an open-source framework from Meta for building iOS and Android apps with React. People often call it, and the tooling around it, the React Native SDK. Third-party SDKs for React Native are npm packages that add native iOS and Android code to your app.

### Is react-native init still the way to create a project?

No. The react-native init command is deprecated. The React Native team recommends starting with a framework such as Expo, using npx create-expo-app@latest. Without a framework, use npx @react-native-community/cli@latest init.

### Can I use native SDKs in an Expo app?

Yes, in a development build or a build made with EAS Build. Expo Go only contains a fixed set of native modules, so SDKs with their own native code, such as UXCam's, don't load there.

### Do I need to link native modules manually?

Usually not. Autolinking, built into React Native since version 0.60, adds a package's native code to your iOS and Android projects. On iOS you still run pod install after installing the package.

### How do I know the UXCam React Native SDK is installed correctly?

Turn on enableIntegrationLogging in a debug build, then send the app to the background. Xcode's console or Android Studio's Logcat should show Verification successful and Session uploaded. The session then appears in your UXCam dashboard within about a minute.

**You might also be interested in these:**

[React Native analytics: a practical implementation guide](https://uxcam.com/blog/react-native-analytics/)

[Session replay for React Native apps](https://uxcam.com/blog/react-native-session-recording-replay-tool/)

[Heatmaps for React Native apps](https://uxcam.com/blog/heatmap-tool-react-native-mobile-apps/)

[React Native crash reporting: tools and techniques](https://uxcam.com/blog/react-native-crash-reporting/)

[React Native performance monitoring: tools and techniques](https://uxcam.com/blog/react-native-performance-monitoring/)

[.NET MAUI vs React Native: how to choose the right framework](https://uxcam.com/blog/net-maui-vs-react-native/)
