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

onLoopEnd is not called in iOS but is called on android

Open kiranjd8 opened this issue 1 year ago • 2 comments

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

Offer's tab (R) (1).rev.zip

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

kiranjd8 avatar May 31 '24 10:05 kiranjd8

Hi! Did you solve it? @kiranjd8

BrandonEscamilla avatar Aug 10 '24 09:08 BrandonEscamilla

@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

kiranjd8 avatar Aug 19 '24 05:08 kiranjd8