You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Horizon Platform SDK works perfectly in pure Android and Flutter applications, but is incompatible with React Native due to wrapped C++ symbol requirements (__wrap__ prefix). This blocks all React Native developers from integrating Horizon Billing and targeting the Quest Store.
When React Native apps try to use Horizon Platform SDK, they crash with:
java.lang.UnsatisfiedLinkError: dlopen failed:
cannot locate symbol "__wrap__ZTVSt12length_error"
referenced by "/data/app/.../lib/arm64-v8a/libpsdk_jni.so"
cd android && ./gradlew assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apk
6. Observe Crash
App crashes immediately when startConnection() is called.
Stacktrace
FATAL EXCEPTION: main
Process: dev.hyo.martie, PID: 398
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__wrap__ZTVSt12length_error" referenced by "/data/app/~~XXX/dev.hyo.martie-YYY/base.apk!/lib/arm64-v8a/libpsdk_jni.so"...
at java.lang.Runtime.loadLibrary0(Runtime.java:1071)
at java.lang.System.loadLibrary(System.java:1893)
at com.meta.horizon.platform.PlatformSDK.<clinit>(PlatformSDK.java)
at com.meta.horizon.billingclient.api.HorizonBillingClient.startConnection(HorizonBillingClient.java)
Screenshots and Videos
Expo App (Failed 😞)
expo.mp4
Shows React Native/Expo app crashing when attempting to connect to Horizon Billing.
Android App (Success ✅)
android.mp4
Same Horizon SDK works perfectly in pure Android (Kotlin) implementation.
Flutter App (Success ✅)
flutter.mp4
Same Horizon SDK works perfectly in Flutter implementation.
All three apps tested on the same device (Meta Quest 3) with the same SDK version.
Questions
1. Why does the SDK use wrapped symbols?
Is the __wrap__ prefix intentional or a build artifact?
What is the purpose of symbol wrapping?
How does it work in pure Android/Flutter if they also use standard libc++?
2. Is React Native officially supported?
Are you aware of this compatibility issue?
Is there a React Native-compatible version available?
Are there plans to support React Native?
3. Is there a wrapped libc++ we're missing?
We searched these SDK artifacts but didn't find a wrapped libc++_shared.so:
android-platform-sdk-72.aar
horizon-billing-compatibility-1.1.1.aar
If it exists:
Where is it located in the SDK?
How should it be configured?
Why does Flutter find it but React Native doesn't?
Description
The Horizon Platform SDK works perfectly in pure Android and Flutter applications, but is incompatible with React Native due to wrapped C++ symbol requirements (
__wrap__prefix). This blocks all React Native developers from integrating Horizon Billing and targeting the Quest Store.Also posted facebook/react-native#54220
The Issue
When React Native apps try to use Horizon Platform SDK, they crash with:
Platform Compatibility
Environment Tested
com.meta.horizon.platform.ovr:android-platform-sdk:72)com.meta.horizon.billingclient.api:horizon-billing-compatibility:1.1.1Why React Native Is Different
React Native has a specific native library loading architecture:
libc++_shared.soduring static initialization before any third-party code runs__wrap__prefix)ANDROID_STL=c++_sharedwith standard symbolsResult: When
libpsdk_jni.sotries to load and searches for wrapped symbols, they don't exist in the already-loaded libc++, causing an immediate crash.Technical Details
Symbol Mismatch:
APK's
libc++_shared.so(from React Native):What
libpsdk_jni.soexpects:React Native's Loading Sequence:
SoLoader.init()ReactNativeJNISoLoader.staticInit()loads native libs →libc++_shared.soloaded (standard symbols)HorizonBillingClient.startConnection()→ tries to loadlibpsdk_jni.so→ searches for__wrap__symbols → not found → crashSteps to Reproduce
Full reproducer available: hyochan/expo-iap#105
1. Create React Native Project
npx create-expo-app@latest HorizonTest cd HorizonTest2. Add Horizon Platform SDK
android/build.gradle:
android/app/build.gradle:
3. Add App ID to AndroidManifest.xml
4. Initialize Horizon Billing
5. Run on Quest
6. Observe Crash
App crashes immediately when
startConnection()is called.Stacktrace
Screenshots and Videos
Expo App (Failed 😞)
expo.mp4
Shows React Native/Expo app crashing when attempting to connect to Horizon Billing.
Android App (Success ✅)
android.mp4
Same Horizon SDK works perfectly in pure Android (Kotlin) implementation.
Flutter App (Success ✅)
flutter.mp4
Same Horizon SDK works perfectly in Flutter implementation.
All three apps tested on the same device (Meta Quest 3) with the same SDK version.
Questions
1. Why does the SDK use wrapped symbols?
__wrap__prefix intentional or a build artifact?2. Is React Native officially supported?
3. Is there a wrapped libc++ we're missing?
We searched these SDK artifacts but didn't find a wrapped
libc++_shared.so:android-platform-sdk-72.aarhorizon-billing-compatibility-1.1.1.aarIf it exists: