Install the package
Package: @aplyna/react-native · version 1.0.1. Import the default Aplyna export from @aplyna/react-native.
- Install @aplyna/react-native with npm or yarn.
- Run your app's existing iOS pod-install workflow and rebuild the native application.
npm install @aplyna/react-native
cd ios
bundle exec pod installSend an event
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.