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

LottieView imperative api not working for bare RN project

Open georgiosApo opened this issue 9 months ago • 1 comments

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

  1. Init new project with npx @react-native-community/cli@latest init AwesomeProject
  2. Add lottie-react-native to project
  3. Run pod install in your ios folder
  4. Replace App.tsx content with lottie-react-native imperative api example implementation from GitHub
  5. 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

georgiosApo avatar Mar 16 '25 18:03 georgiosApo

Same issue, does not work in new architecture react native ("lottie-react-native": "^7.2.2", "react-native": "0.79.2")

Soft-Gurus avatar Jun 02 '25 13:06 Soft-Gurus

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",

farhanWM avatar Jun 19 '25 04:06 farhanWM

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.

stale[bot] avatar Jul 30 '25 22:07 stale[bot]

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.

stale[bot] avatar Aug 07 '25 04:08 stale[bot]