rive-app / rive-react-native

MIT License
543 stars 40 forks source link

rive-react-native + Expo Go #163

Open lisherwin opened 1 year ago

lisherwin commented 1 year ago

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)

Additional context

HayesGordon commented 1 year ago

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

iway1 commented 1 year ago

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)

ashuvssut commented 1 year ago

@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.

iway1 commented 1 year ago

@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?

itsyoboieltr commented 1 year ago

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

t1gu1 commented 4 months ago

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)