LottieView imperative api not working for bare RN project
Description
Hello Lottie!
Using LottieView in a declarative way works just fine, however I want to use the imperative api to trigger the animation on button press. This simply doesn't work for me. I've inited a new RN project through the community cli to make sure it wasn't my project that was causing issues.
Maybe this is an issue when using lottie-react-native outside an Expo environment. My snack work just fine.
Might be missing something obvious here, any pointers would be much appreciated!
Steps to reproduce
- Init new project with npx @react-native-community/cli@latest init AwesomeProject
- Add lottie-react-native to project
- Run pod install in your ios folder
- Replace App.tsx content with lottie-react-native imperative api example implementation from GitHub
- Animation won't run when running app in ios simulator
Snack or a link to a repository
https://snack.expo.dev/@kentagent/adequate-blue-tortilla?platform=ios
Lottie React Native version
7.2.2
React Native version
0.78.0
Platforms
iOS
Workflow
React Native
Architecture
Fabric (New Architecture)
Build type
Debug app & dev bundle
Device
iOS simulator
Acknowledgements
Yes
Same issue, does not work in new architecture react native ("lottie-react-native": "^7.2.2", "react-native": "0.79.2")
Is this a known issue? It has never work for me on iOS for a while now; only works on Android currently for me. Anyone has a solution? I am using this for React Native project.
"lottie-react-native": "6.5.1", "react-lottie": "^1.2.4", "react-native": "0.73.6",
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.