Installation
The tiun React Native SDK renders the tiun snippet inside a WebView and bridges login and checkout to native, with the user's session bound to a hardware-backed device key.
Install the SDK
npm install @tiun/react-native-sdkpnpm add @tiun/react-native-sdkyarn add @tiun/react-native-sdkInstall the native dependencies
The SDK relies on native modules for the WebView, the device key, session storage, and the payment redirect. All of them are peer dependencies — install them alongside the SDK. There are no JavaScript fallbacks; a missing module fails at bundle time.
react-native-webview
Hosts the tiun snippet.
react-native-secure-sign
Hardware-backed device key (Secure Enclave / Android Keystore).
react-native-keychain
Stores the session token in the Keychain / Keystore.
react-native-inappbrowser-nitro
Opens the payment redirect in the in-app browser.
react-native-nitro-modules
Runtime required by the in-app browser.
npm install react-native-webview react-native-secure-sign \
react-native-keychain react-native-inappbrowser-nitro \
react-native-nitro-modulespnpm add react-native-webview react-native-secure-sign \
react-native-keychain react-native-inappbrowser-nitro \
react-native-nitro-modulesyarn add react-native-webview react-native-secure-sign \
react-native-keychain react-native-inappbrowser-nitro \
react-native-nitro-modulesOn iOS, install the pods afterwards:
Register the return deep link
After payment, the provider redirects back to your app through a deep link. You pick the URL — for example myapp://tiun/return — pass it to the SDK as returnUrl, and register its scheme in your native config. Checkout cannot complete without it.
iOS
Add the scheme to ios/<YourApp>/Info.plist:
Then forward incoming links to React Native's Linking module, which is what the SDK listens on. Add this to ios/<YourApp>/AppDelegate.swift:
Android
Add an intent filter to your main activity in android/app/src/main/AndroidManifest.xml:
The scheme, host, and path here must match the returnUrl you pass to the SDK. See Configuration.
Device requirements
The user's session is bound to a non-exportable key in the device's secure hardware, which affects where you can test.
Physical iPhone
Works.
iOS Simulator
Not supported — there is no Secure Enclave, so the device key can't be created.
Android emulator
Works.
Physical Android device
Works.
Next: mount the provider and configure it in Configuration.
Last updated
Was this helpful?

