Open gouthamravella opened 2 years ago
We are facing the same issue. Given that the issue is quite basic and is open for almost a year and not even the provided examples work: Is the react-native integration still a priority or will it not be maintained going forward?
Hello! React native integration is still a priority; there will be a major bump coming pretty soon here as it gets this runtime up-to-date with the underlying native iOS and Android runtimes, though I suspect this issue, in particular, is something different. Do you mind providing an example Rive file (or the URL of a hosted Rive) that provides the "no artboard found" error so we can try and reproduce?
I ran into the same issue when trying to use the truck_v7.riv
animation file found in your examples folder. I opened it up using Rive to check how animations and artboards are called but when I tried setting their names in RN, it didn't work.
I downloaded the .riv
file and added it to my project. I used expo-assets to import it and passed it to the url-prop of the <Rive>
component. (This seems to be the only way .riv
files can currently be added when stored locally, which is quite odd by itself already..)
Additionally, I passed the animationName and artboardName to the Rive component, the same names that I found in Rive after importing the example animation, leading to a crash with the above mentioned error.
I was using the current Rive 3 version.
@MarianLudwig How are you starting the app? The default yarn start
that comes out of a clean react native project?
Right now - we have two supported ways for adding in Rive files, one by using the url
route which it looks like you're aware of. The other is adding the asset manually to ios
and android
platforms resource bundles (more outlined here: https://help.rive.app/runtimes/overview/react-native/loading-in-rive-files). We haven't done too much exploratory work with incorporating assets with expo-asset
.
@zplata Yes, I'm starting it with the default yarn start
. I'm also using expo which is responsible for bundling, thus I oriented myself here: #123 to get it working. And I can import the animations, the only issue is that I cannot access artboards or animation names if multiple animations are in a file. So I need a separate file for each animation, which is a bit of a bummer, considering Rive's possibility to cluster animations and artboards in one file.
Also, we noticed that, using the import with expo-asset, android deployments have a problem loading the files. I already opened another issue on that, though. (#151)
using .riv file of version v7.
First of all normal asset file is not loading with the resourceName option in android. Tried many ways to resolve the issue. But no use. Hosted the file to cloud and added the url to 'url' option. After this asset not found issue is resolved but got a new issue called No artboard found.
I have tried to provide multiple names even with artboard name in the editor.
Please suggest how to resolve these issues.