Skip to content
Docs
Documentation/Mobile SDKs
Mobile SDKs

React Native

Install the React Native source SDK for Aplyna's iOS billing pilot, purchase restoration and verified entitlements, plus iOS/Android events and configuration.

On this page Install the packageSend an eventShared methods

Install the package

Package: @aplyna/react-native · version 1.0.1. Import the default Aplyna export from @aplyna/react-native.

  1. Install @aplyna/react-native with npm or yarn.
  2. Run your app's existing iOS pod-install workflow and rebuild the native application.
Install
npm install @aplyna/react-native
cd ios
bundle exec pod install

Send an event

TypeScript
import Aplyna from '@aplyna/react-native';

const installationId = await Aplyna.configure({ apiKey: 'YOUR_APP_SDK_KEY' });
// Only after your application permits tracking:
await Aplyna.setConsent(true);
await Aplyna.track('app_opened');
await Aplyna.flush();

configure returns a persisted anonymous installation ID and starts with consent disabled. Supply your existing installationId when adopting an existing integration. Catch rejected promises and retry flush later after final delivery failures.

Shared methods

The adapter exposes setConsent, track, flush, pendingEventCount, assignment, expose and configuration. Track options include flowId, stepId, assignment and string-valued properties. Fetching an assignment does not expose it: call expose when the assigned UI is actually visible. iOS configuration supports schemas 1/2; Android supports schema 1. Keep bundled fallback UI.