rive-react-native icon indicating copy to clipboard operation
rive-react-native copied to clipboard

rive-react-native + Expo Go

Open lisherwin opened this issue 2 years ago • 6 comments

Description

I am building an app with Expo Go and I am wondering if rive-react-native currently works in an Expo Go app. I've thoroughly read the documentation and I am still unsure. I see that installation steps include updating pods manually, which would not work in Expo Go. Additionally I see a line "The Rive React Native runtime does not have support for Expo at this time" indicating similarly that rive-react-native would not work in an Expo Go app.

If this is not yet supported, are there plans to have Rive supported in Expo Go apps? Is there a timeline for this? TYIA

Provide a Repro

Not Available. Just that I am unable to pod install for an Expo Go app.

Expected behavior

Would love for rive-react-native to work in Expo Go!

Screenshots

Device & Versions (please complete the following information)

  • Device: iOS Simulator

Additional context

lisherwin avatar Mar 17 '23 04:03 lisherwin

Hi @lisherwin, we're definitely considering adding better expo support, though no timeline for that as of now. The line in the docs about the RN runtime not having support in Expo was added at a time when it did not work, and Expo did not allow you to add Native modules easily.

There are community docs in this issue that mentions some considerations for adding Rive to an Expo app, that you may want to take a look at: https://github.com/rive-app/rive-react-native/issues/123

Expo allows you to add libraries with custom native code: https://docs.expo.dev/workflow/customizing/#generate-native-projects-with-prebuild

Here is an example Rive expo app: https://github.com/lklima/rive-animated-app

HayesGordon avatar Mar 17 '23 08:03 HayesGordon

I don't think it's realistic to expect that Rive ever works with Expo Go since it depends on their native SDKs which wouldn't really make sense to have included in Expo Go.

It should be possible within the managed workflow (and currently is for iOS, I don't think it works on android though)

iway1 avatar Mar 26 '23 16:03 iway1

@iway1 It is possible

take example of notifee. It depends on native SDKs. So expo has a "config-plugin" for notifee to make it work in managed expo dev env see https://github.com/expo/config-plugins.

ashuvssut avatar Mar 27 '23 18:03 ashuvssut

@ashuvssut config plugins can allow it to work with expo's managed workflow, but not Expo Go which is what this issue is.

A config plugin for the managed workflow doesn't seem to be necessary at the moment on iOS (it already works in the managed workflow for iOS), but maybe it would be helpful for Android?

iway1 avatar Mar 27 '23 18:03 iway1

Expo Go + Web support with metro would be the premium animation experience really in cross-platform development :D

itsyoboieltr avatar Aug 01 '23 16:08 itsyoboieltr

I just create an issue, almost a doc on how to make Rive works on web and ios/Android. https://github.com/rive-app/rive-react-native/issues/257

Also in that example, expo go still works, but the animation won't (Will display a placeholder image) Still need to build the app for IOS/Android to see the animation. (At least you can still use expo go when develloping other things)

t1gu1 avatar Jun 24 '24 00:06 t1gu1