React Native Platform Notes#
Setup details that don’t fit cleanly into the layer pages but matter for a working HAAPI integration on React Native. Each note is short and stands alone.
Toolchain Prerequisites#
| Tool | Version |
|---|---|
| Node | 22 or later |
| npm | 10 or later |
| React Native | 0.85.3 or later |
| Expo SDK | 56 or later |
| Xcode (iOS) | 26.2 or later |
| iOS deployment target | 16.4 or later |
| CocoaPods (iOS) | 1.16 or later |
| Android Studio (Android) | Latest |
| JDK (Android) | 17 or later |
Android compileSdk | 36 |
Android minSdk | 26 |
| Gradle | 8 or later |
The SDK is built and tested against these versions. Older toolchain versions may work for development but are not supported.
Native HAAPI SDK Pin#
The package pins a single HAAPI native SDK version (currently 5.3.0) used on both platforms. The version is read from the package’s package.json haapi.version field at build time — iOS via Swift Package Manager from https://github.com/curityio/ios-idsvr-haapi-sdk-dist, Android via Maven through Gradle’s se.curity.identityserver:identityserver.haapi.android.sdk artifact.
You don’t pick the native version yourself; bumping the React Native SDK npm package picks up the matching native pin transitively.
iOS — CocoaPods + Swift Package Manager#
The iOS HAAPI SDK is delivered through Swift Package Manager, but Expo autolinking still wires the React Native module into the Pods graph. After npm install, run pod install from your ios/ directory:
cd ios && pod install
If your host app uses a custom Podfile, ensure it does not override use_modular_headers! or Swift module settings that the SDK podspec requires. The reference Podfile shipped with the SDK example app demonstrates a working configuration.
For projects using the Expo prebuild workflow, regenerate the iOS project (npx expo prebuild --platform ios) after upgrading the SDK to pick up any podspec changes.
Android — Gradle Configuration#
The Android build expects compileSdkVersion = 36 and minSdkVersion = 26. If your host project declares lower values in android/build.gradle or android/app/build.gradle, the HAAPI Android SDK fails to compile.
For Expo-managed apps, set these in android/build.gradle:
buildscript {
ext {
compileSdkVersion = 36
minSdkVersion = 26
targetSdkVersion = 36
}
}
JDK 17 is also required — set org.gradle.java.home in gradle.properties or via your system’s JAVA_HOME.
Deep Links — appRedirect#
The redirect URI registered with the OAuth client must match the deep-link scheme registered with both platforms. The SDK’s appRedirect config carries this URI; the host app is responsible for registering the scheme in the native projects.
iOS — register the URL scheme under URL Types in Info.plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>haapi</string> <!-- matches appRedirect: "haapi:start" -->
</array>
</dict>
</array>
Android — declare an intent filter on the relevant Activity in android/app/src/main/AndroidManifest.xml:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="app" android:host="haapi" /> <!-- matches appRedirect: "app://haapi" -->
</intent-filter>
Expo’s Linking module can also configure schemes — refer to its documentation if you use app.json schemes instead of editing native files directly.
Attestation on Simulators and Emulators#
iOS and Android both require a real device for hardware-backed attestation (DeviceCheck / App Attest on iOS, Key Attestation on Android). On simulators / emulators, configure DCR fallback in your platform config — see DCR and Step 6 of the Quickstart .
Extending Native Behaviour#
JS configuration carries enum string keys (e.g., URLSessionOption.Custom, StorageOption.Custom, KeyStoreOption.Client) that the native bridge resolves through a registry of pluggable Resolver instances. The SDK ships defaults for the common values; for custom values, the host app registers a Resolver in Swift / Kotlin code before initialising the accessor. See Native Resolvers for the full mechanism, default-resolver inventory, and registration examples.
Cross-platform vs Platform-specific Quirks#
For deeper platform-specific behaviours (iOS AutoFill, ASWebAuthenticationSession, Android cookie handling, manifest flags), the platform-notes pages for the underlying native SDKs still apply because the React Native SDK delegates to them through the bridge.
Related: iOS Platform Notes · Android Platform Notes · React Native SDK