Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset Handler API Compatibility with React Native #236

Open
RomualdPercereau opened this issue Apr 23, 2024 · 7 comments
Open

Asset Handler API Compatibility with React Native #236

RomualdPercereau opened this issue Apr 23, 2024 · 7 comments

Comments

@RomualdPercereau
Copy link

Handling Assets with the Asset Handler API doesn't seems to be available with react-native.

Could you please provide any insights into whether there is an intended plan or roadmap for supporting the Asset Handler API for react-native in the near future?

Thank you for your work on this!

@RomualdPercereau RomualdPercereau changed the title Asset Handler API - Avaibilty Asset Handler API Compatibility with React Native Apr 23, 2024
@yigityu
Copy link

yigityu commented May 2, 2024

Looks like there is a branch by @zplata which does this:

https://github.com/rive-app/rive-react-native/tree/bump-ios-android-oob

But it seems inactive. It would be great if we could get this soon as well.

@RomualdPercereau
Copy link
Author

@zplata Any update on this ? 🙂

@RomualdPercereau
Copy link
Author

@zplata I hope you are doing well, do you know if you are going to work again on it?

@tslater
Copy link

tslater commented Nov 9, 2024

Looks like the branch by @zplata is only iOS, no android support. Curious if the maintainers would accept a PR?

@Traviskn
Copy link

I made a bit of progress on the android side, this is a simpler implementation that only supports remote asset urls: Branch Comparison

I could probably update the initialAssetsHandled prop to be a nested map of asset name to either an assetUrl or a bundledAssetName, using a different loader class for each

@Traviskn
Copy link

ok I updated my branch to also support locally bundled assets, working in my testing with the example app. I might try to pull in the changes from @zplata's branch as well to see if I can get iOS working

@Traviskn
Copy link

I pulled most of the changes from @zplata's branch over for iOS see branch comparison

it's working for local rive files and remote asset urls. It's still missing font support and apparently if you load a riv file from a url it doesn't accept the asset loader callback, might need to check rive-ios to see if that's really the case. On android I had to omit the file extension for bundled assets, for iOS we need to include the file extension. Will need to figure out a solution to make the bundled asset api match across platforms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants