Build from Source
Building requires access to the SDK source repository, which is not public. Build the React Native SDK from the repository and link it into your app. Use this when you need to:- Consume an unreleased branch
- Target an ABI the prebuilt package doesn’t ship (e.g. Android
x86) - Apply a local patch
- Audit the native code before shipping
Prerequisites
- Rust toolchain (
rustup) - Node.js 20+
- Xcode 15+ with command-line tools (for iOS)
- Android NDK 26+ with
ANDROID_NDK_HOMEset (for Android) cargo-ndkinstalled:cargo install cargo-ndk
Build
From thesdk/ directory:
packages/privacy-boost-react-native/sunnyside-io-privacy-boost-react-native-<version>.tgz.
Granular targets
If you only need one platform or want to skip ahead:Install the tarball
In your RN app:Developing against a local checkout
For tight iteration (edit Rust → rebuild → test in app), skip the tarball and link the package directly. From your app:Gotcha: Metro reads the package’sreact-nativefield, which points atsrc/index, so it picks up JS edits insrc/on reload. Type checking (thetypesfield) and anything that resolvesmainreadlib/, which onlymake rn-buildrefreshes.
Common build errors
ANDROID_NDK_HOME not set
Install the NDK via Android Studio’s SDK Manager, then:
error: linker 'cc' not found on Android build
cargo-ndk isn’t installed, or your toolchain is stale. Run
cargo install cargo-ndk and retry.
Found incorrect path in 'types' field on npm run build
You skipped the post-codegen patch step. The Makefile targets run it for you;
if you invoked npm run ubrn:ios directly, also run
bash sdk/scripts/fix-ubrn-codegen.sh.
Tests fail with mock drift errors
make rn-mock regenerates the Jest mock from the current bindings. Run it
after any UDL change.
What gets built
lib/ included. Regenerate them on every branch
checkout that changes UDL or Rust source.