Rive React Native Expo.
RunningBefore running your app, you first need to generate the iOS and Android native projects to take ownership of them. You can do this by runningnpx expo start
will not work as Expo Go does not include the native libraries needed to run Rive. If you were to run this command you’ll see the following error:Invariant Violation: requireNativeComponent: "RiveReactNativeView" was not found in the UIManager.
npx expo prebuild
, or npx expo run:[ios|android]
(which will run prebuild
automatically).
npx expo run:android
requires Android Studio and the Android SDK to be installed. See the setup environment guide.npx expo run:ios
requires Xcode (macOS only) installed on your computer. See the setup environment guide.android
and ios
build folders in your project directory. These projects allow you to configure your iOS and Android application as you would for a traditional native application.
Something went wrong running pod install in the ios directory.
14.0
(this is the minimum version that Rive iOS supports). Open ios/Podfile
and look for the platform :ios
version. It should look something like this:
13.0
to 14.0
:
riv
file as a network asset. To load files from the asset bundle they need to be included in Android Studio and XCode as assets, see Loading in Rive Files.
You can also see this Github Issue for an alternative approach to load assets.