rive-react-native
rive-react-native copied to clipboard
onLoopEnd is not called in iOS but is called on android
Description
For the same .riv file, onLoopEnd is called properly on android it is not called on iOS.
Use case is to store when that animation is shown to the user after animation is played and not animate again
Provide a Repro
<Rive
ref={animationRef}
style={{ width: 48, height: 48 }}
resourceName={'offers_tab'}
onLoopEnd={onAnimationEnd}
/>
Source .riv/.rev file
Expected behaviour
Trigger onLoopEnd callback similar to android
Device & Versions (please complete the following information)
- Device: iPhone 11
- OS: 17.4.1
- NPM Version: 10.2.4
Hi! Did you solve it? @kiranjd8
@BrandonEscamilla Tried the examples from Rive website but the same callback is not getting triggered as in the android. Worked around it on iOS by using onPause and using onLoopEnd on android