rive-app / rive-ios

iOS runtime for Rive
MIT License
484 stars 55 forks source link

Animation (trigger) randomly stop working #223

Closed derech1e closed 1 year ago

derech1e commented 2 years ago

Description

The animations of the button does not always work. When programming, it works in one build and in the next, even though you haven't changed anything, it doesn't work again. In the video I just close and open the app and it doesn't work anymore. The animation of the button at the bottom just not show up.

Provide a Repro

See the source here

I could not always reproduce the error myself.

Source .riv/.rev file

Issue.zip

The code is a stripped down version of the video below.

Expected behavior

The animations should run smoothly every time. Furthermore, the animations should also work when you open the app again. You close and open the app several times a day.

Screenshots

See the attached Video

Screenshot

There are 3 animations that I want to focus on in the video.

  1. The button animation itself
  2. The check animation
  3. The confetti

During the black bar, I just restarted the app and then pressed the button again. No animation is played. The only animation that works is the "check animation".

Device & Versions (please complete the following information)

Additional context

I haven't been able to find out what exactly is causing this behavior until now. Sometimes it works perfectly for me and then it suddenly the animation doesn't work again without even restarting the app.

duncandoit commented 2 years ago

The source that you provided doesn't have the full app source. So I couldn't test in the full context of the working app, but I did get it running with the AddView as the root View. I did see the same issue that you saw in your post however it was fixed by commenting out the show.toggle() line in the logIn() func. Don't know what knock-on effects that will have for your app, but that did seem to be the cause of the problem. Also, I would recommend adding a check.triggerInput("Reset") line in one of your async timers so that the check mark state machine resets to the beginning.

derech1e commented 2 years ago

Ok, I'll try that. Can I send you the whole project via E-Mail? I don't want that my whole src on a public GitHub issue.

caudetgit commented 2 years ago

@derech1e If you are still experiencing the issue after trying @duncandoit 's suggestion, you can log a Support ticket here and share the project with us directly.

mjtalbot commented 1 year ago

Going to close this issue as its pretty old and a solution has been provided. If you are still experiencing problems with animation triggers not working please do reopen the issue.