diff --git a/runtimes/react-native/error-handling.mdx b/runtimes/react-native/error-handling.mdx index 9a0c7916..8fa837ab 100644 --- a/runtimes/react-native/error-handling.mdx +++ b/runtimes/react-native/error-handling.mdx @@ -88,3 +88,24 @@ import { RiveView, RiveErrorType } from "@rive-app/react-native"; If no `onError` handler is provided, errors will be logged to the console by default. + +### Android Runtime Initialization + +On Android, the Rive native library is automatically initialized at app startup. In rare cases (ABI mismatch, missing native libraries, etc.), this initialization can fail. Use `RiveRuntime.getStatus()` to check whether initialization succeeded: + +```ts +import { RiveRuntime } from '@rive-app/react-native'; + +const { isInitialized, error } = RiveRuntime.getStatus(); +if (!isInitialized) { + console.error('Rive failed to initialize:', error); +} +``` + + +On iOS, the runtime requires no explicit initialization — `getStatus()` will always return `{ isInitialized: true }`. + + + +**Advanced:** If you need full control over when initialization happens, you can disable automatic initialization by adding `Rive_RiveRuntimeAndroidSkipSetup=true` to `android/gradle.properties` and calling `RiveRuntime.initialize()` yourself. This is not recommended for most apps — only use this if you have a specific reason to defer initialization. +