Package Installation
Choose the packages based on your feature requirements:Full Installation (All Features)
LLM Only (Text Generation)
Voice Only (STT/TTS)
Required Peer Dependencies
The SDK uses Nitro Modules for its native bridge and requires file system access for model downloads:Include only the SDK modules you need. Each native module adds to your app size: -
@runanywhere/core: ~2MB (required) - @runanywhere/llamacpp: ~15-25MB (for LLM text
generation) - @runanywhere/onnx: ~50-70MB (for STT, TTS, and VAD)
Package Overview
| Package | Size | Features |
|---|---|---|
@runanywhere/core | ~2MB | Core SDK, model management, events |
@runanywhere/llamacpp | ~15-25MB | LLM text generation (GGUF models) |
@runanywhere/onnx | ~50-70MB | STT, TTS, VAD (ONNX models) |
Supported Model Formats
| Format | Extension | Backend | Use Case |
|---|---|---|---|
| GGUF | .gguf | LlamaCPP | LLM text generation |
| ONNX | .onnx | ONNX Runtime | STT, TTS, VAD |
iOS Setup
Podfile Requirements
TheNitroModules pod must be manually added in your Podfile:
Podfile
New Architecture (iOS)
If you encounter crashes withreact-native-screens or native stack navigator on iOS with New Architecture, disable it:
Podfile
@react-navigation/stack (JS-based) instead of @react-navigation/native-stack on iOS, and mock react-native-screens via Metro config if needed.
iOS Permissions
Add required permissions to yourInfo.plist:
Info.plist
NSMicrophoneUsageDescription is only required if you’re using STT or VAD with microphone input.
The app does NOT need NSAllowsArbitraryLoads — configure specific exceptions as needed.Android Setup
Native libraries are automatically downloaded during the Gradle build.Android Build Requirements
| Requirement | Minimum Version |
|---|---|
| Android SDK | compileSdk 36 |
| Android NDK | 28.0.13004108 |
| JDK | 17+ |
| Min API | 24 (Android 7.0+) |
| Kotlin | 2.1.20 |
Gradle Configuration
Inandroid/settings.gradle, explicitly include react-native-nitro-modules:
settings.gradle
android/app/build.gradle, add pickFirsts to resolve duplicate native library conflicts:
app/build.gradle
Android Permissions
Add required permissions to yourAndroidManifest.xml:
AndroidManifest.xml
Runtime permission for
RECORD_AUDIO must be requested via PermissionsAndroid.request() before
using STT or Voice Pipeline features.Running on Physical Device
- Enable Developer Options: Settings → About Phone → Tap “Build Number” 7 times
- Enable USB Debugging: Settings → Developer Options → USB Debugging
- Connect device:
adb devices(should show your device) - Port forwarding:
adb reverse tcp:8081 tcp:8081 - Start Metro:
npm start - Run app:
npx react-native run-android
ProGuard Rules
If using ProGuard/R8 minification, add these rules toproguard-rules.pro:
proguard-rules.pro
Troubleshooting Installation
iOS: Pod Install Fails
Android: Native Library Not Found
This error typically occurs when running on an emulator:Android: “hermesEnabled” Property Not Found
Solution: Copy the gradle.properties example file:Android: “Unable to load script” on Device
Solution: Set up port forwarding for Metro bundler:Android: Grey Screen After Launch
Solution: Metro bundler may have stopped. Restart it:Metro: Module Resolution Issues
Both Platforms: Fresh Build
Native Binary Sizes
| Framework | iOS (xcframework) | Android (so) |
|---|---|---|
| RACommons | ~2MB | ~2MB |
| RABackendLLAMACPP | ~15-25MB | ~15-25MB |
| RABackendONNX | ~50-70MB | ~50-70MB |
Next Steps
Quick Start
Initialize the SDK and run your first inference →