Skip to content
NuxieNuxie
Esc
↑↓navigate↵open⌘Jpreview
Open Nuxie
On this page

Connect with React Native

Connect a React Native or Expo development build and verify native Experience delivery.

The React Native SDK displays native Nuxie Experiences in your iOS and Android app. A TypeScript client and React hooks let you send events, react to feature access, and handle actions from an Experience. Use a bare React Native app or an Expo development build.

Installation

Installation

Prepare the package from the SDK repository. This requires Node 24, pnpm 11, Bun, Xcode/CocoaPods, JDK 17, and the Android SDK/NDK:

git clone https://github.com/nuxieai/nuxie-react-native.git
cd nuxie-react-native
pnpm install --ignore-workspace
pnpm --ignore-workspace run prepare:native
pnpm --ignore-workspace run build
pnpm --ignore-workspace run check:package
npm pack

Install the tarball printed by npm pack in your app. For example, run npm install /absolute/path/to/the-package.tgz.

Use React Native 0.87.1 or Expo 57 / React Native 0.86.3, with the New Architecture and React 19.2.3. Target iOS 16.4+ or Android 7+; Android supports arm64-v8a and x86_64.

For bare React Native, install pods and rebuild. For Expo, use a development build; Expo Go cannot load the native SDK. Nuxie autolinks without an Expo config plugin.

Initialize

Initialize

Copy your app’s public keys from Connect your app. Use pk_test_ keys in development builds and pk_live_ keys in release builds. Keep the default service environment for both; the key selects preview or live content.

Configure the client during application startup:

import { nuxie } from '@nuxie/react-native';

await nuxie.configure({
  apiKeys: {
    ios: 'YOUR_IOS_PUBLIC_KEY',
    android: 'YOUR_ANDROID_PUBLIC_KEY',
  },
});

You can also pass the configuration to NuxieProvider. The provider renders children while setup runs; use useNuxieStatus() to wait for configured.

Run your app on a device or simulator. Connect your app shows Connected after Nuxie receives a request from the SDK.

Trigger an Experience

Trigger an Experience

Publish an Experience for this app with the event trigger integration_test. Set its re-entry rule to Every time if you want to show it repeatedly while integrating. Add this call to a button handler after setup:

import { nuxie } from '@nuxie/react-native';

await nuxie.trigger('integration_test');

Tapping the button sends the event. Nuxie displays the Experience when the customer matches its audience and delivery rules. For an existing Experience, replace integration_test with its published event name.

Connect your app changes to Shown after the SDK reports that the Experience appeared.

Update an Experience

Update an Experience

Edit the Experience and publish your changes. Bring the app back to the foreground to fetch the update, then send the event again with a customer who can re-enter. New Journeys use the updated version; a Journey already in progress keeps the version it started with. The app code stays the same.

See the SDK reference for identity, feature access, and App Actions. Delivery explains trigger and audience configuration.

Last updated on

Was this page helpful?