Skip to Content
React Native SDKInstallation

Installation

The package

npm install @vio-live/react-native-sdk

That is all you need for the headless core. react is the only required peer.

Entry points

The package publishes several entries. Import from the one you need and the rest never reaches your bundle.

ImportWhat it isRequires
@vio-live/react-native-sdkThe core, re-exportedreact
.../coreSame, explicitreact
.../reactProvider and hooksreact
.../uiReady-made componentsreact-native
.../payments/stripeStripe adapter@stripe/stripe-react-native
.../payments/klarnaKlarna viewreact-native-klarna-inapp-sdk

Every native dependency is an optional peer. Install only the payment methods you accept — the SDK does not pull them in, and it does not break when they are absent.

If you use our components

npm install react-native

Already there in any React Native app. Also install @react-native-async-storage/async-storage if you want the cart to survive the app being closed — the SDK falls back to memory without it.

If you take payments

Payments need native SDKs, and each one asks something different of each platform. The short version:

iOSAndroid
Stripe — cards, Apple Pay, Google PayiOS 13+, pod installcompileSdk 36, Kotlin 2.x
Klarnapod install, a URL scheme, two Info.plist entriesa Maven repository you must add by hand
Vipps MobilePaynothingnothing

The Klarna row is the one that surprises people: Klarna publishes its Android artifacts on its own CDN rather than Maven Central, so the build only fails on Android and it reads like a bug in your app. Full steps in iOS specifics and Android specifics.

Native payment SDKs do not run in Expo Go. If you are on Expo, you need a development build before you can take a payment. Everything else — catalog, cart, the components, the whole checkout form — runs in Expo Go.

Verifying the install

import { Vio } from '@vio-live/react-native-sdk'; Vio.init({ apiKey: 'your-app-key', environment: 'testing' }); const { campaign, primarySponsor } = await Vio.bootstrap(); console.log(campaign?.name, primarySponsor?.name);

If that prints your campaign, the app key and the network path are both good.

Last updated on