⚠️ Advanced Configuration
This section is for advanced users who need to use specific versions of the Rive native SDKs. In most cases, you should use the default versions that come with the library. Only customize these versions if you have a specific requirement and understand the potential compatibility implications.Important: If you customize the native SDK versions and later update rive-react-native to a newer version, you should revisit your custom version settings. The custom versions you specified may not be compatible with the updated rive-react-native version. Always check the default versions in the new release and test thoroughly.
Default Behavior
By default, rive-react-native uses the native SDK versions specified in package.json:
"runtimeVersions": {
"ios": "6.12.0",
"android": "10.4.5"
}
These versions are tested and known to work well with this version of rive-react-native.
Customizing Versions
You can override these default versions using platform-specific configuration files.
See the available native Rive Android and iOS versions.
iOS (Vanilla React Native)
Create or edit ios/Podfile.properties.json:
{
"RiveRuntimeIOSVersion": "6.13.0"
}
Then run:
Android (Vanilla React Native)
Add to android/gradle.properties:
Rive_RiveRuntimeAndroidVersion=10.5.0
Expo Projects
For Expo projects, use config plugins in your app.config.ts:
import { ExpoConfig, ConfigContext } from "expo/config";
import { withPodfileProperties } from "@expo/config-plugins";
import { withGradleProperties } from "@expo/config-plugins";
export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
plugins: [
[
withPodfileProperties,
{
RiveRuntimeIOSVersion: "6.13.0",
},
],
[
withGradleProperties,
{
Rive_RiveRuntimeAndroidVersion: "10.5.0",
},
],
],
});
Version Resolution Priority
The library resolves versions in the following order:
iOS:
ios/Podfile.properties.json → RiveRuntimeIOSVersion
package.json → runtimeVersions.ios (default)
Android:
android/gradle.properties → Rive_RiveRuntimeAndroidVersion
package.json → runtimeVersions.android (default)