Baseflow / Baseflow/LottieXamarin

IOS Animation happening too soon

Open
#389 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.2k
Forks
253
PR merge metrics
No merged PRs in 30d

Description

## 🐛 Bug Report

### Expected behavior
When using an IOS device, if I have set the RepeatCount to something greater than "1" I would expect the animation to repeat that many times. Right now, now matter what number you set RepeatCount to, the animation will only repeat once.

I tried setting RepeatMode to "Restart". There was no change.

I tried setting Repeat mode to "Infinite" resulted into the animation playing over and over as expected, however I only want the animation to play a certain number of times.

Android works as it should.

**UPDATE 2/1/2023**
I found by adding some logging that on iOS that animation is happening multiple times prior to the screen loading completing.
For example I set the repeat count to 3. I added some logging in OnFinishedAnimation. This method ran twice before the screen was loaded so it appeared the animation only ran 1 time.

### Reproduction steps
Set the RepeatCount to something greater than 1. In the method OnFinishedAnimation add some logging so that you can see that the animation is taking place even though the screen has not finished loading

### Configuration

Lottie Version: 4.0.11
Xamarin Forms: 5.0.0.2545
using iPhone 12 actual device

**Platform:**
- [X] :iphone: iOS

Contributor guide

Open the contributing guide

Research direction

Start with the Lottie AnimationView configuration and the OnFinishedAnimation callback described in the report, then reproduce RepeatCount="3" on an iOS device while logging callbacks during screen loading. Trace why repeats complete before the screen finishes loading; done means the animation visibly repeats the requested number of times without premature completion callbacks.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, ios
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.