11 Replies
      Latest reply on Apr 6, 2017 12:29 PM by DrMiller
      3DTOPO Level 1 Level 1 (0 points)

        For the life of me, I can't figure out how to make animations to not loop infinitely. If I set the Repetitions property to None or to Fixed and choose 2 (lowest value allowed) the sticker animation repeats infinitely both in the sticker drawer and after the sticker has been sent.

         

        If I inspect the contents of .stickersequence bundle, the "repetitions" field of the "properties" array in the "Contents.json" file, it is set as expected.

         

        Also, I tried using a .gif with the repeat count set to 1 and it still loops infinitely. If I open the same gif in a web browser it only plays once as expected.

         

        Anyone else seeing the same behavior? Has anyone got the animations to not loop infinitely? What is the secret?

         

        I am using Xcode Version 8.0 (8A218a).

        • Re: Animations loop infinitely ignoring settings
          3DTOPO Level 1 Level 1 (0 points)

          It would be very helpful to know if I am the only one experiencing this issue. Do the loop controls work for anyone? I just verified that the issue occurs on my device running 10.0.2 (14A456) as well as the simulator.

            • Re: Animations loop infinitely ignoring settings
              CartoonSmart.com Level 3 Level 3 (270 points)

              I think if you used a PNG sequence you'll see the correct results. An animated gif probably plays by its own set of rules, defined whenever it was created outside of Xcode.

                • Re: Animations loop infinitely ignoring settings
                  3DTOPO Level 1 Level 1 (0 points)

                  But I am using a PNG sequence and no matter what I do the animation loops indefinitely in the simulator and on my devices. You mention you think it should work; can you confirm it in fact is working for you?

                   

                  So I guess I am the only one affected by this issue? I have no idea how to fix it and is a critical issue for my products in development.

                    • Re: Animations loop infinitely ignoring settings
                      CartoonSmart.com Level 3 Level 3 (270 points)

                      The Sticker Sequence option in Xcode really isn't the best method anyway.  Check out an app called PNG Animator in the Mac Store. The compression is WAY better first off,  but you also have a lot more control over the duration and length of individual frames . For example you might set frame 1 to be 2 seconds, frame 2 to be 0.04 seconds,  and so on.  You might need to set the last frame duration to a really high number to essentially not loop.  Just be aware when you export the APNG, the extension should still be .png and then you just drop that into the sticker area or Xcode as if it were a still .png file. So you don't need to create a Sticker Sequence at all.

                        • Re: Animations loop infinitely ignoring settings
                          3DTOPO Level 1 Level 1 (0 points)

                          The problem with PNG Animator is (1) the loop count is ignored and (2) the longest duration it allows for a frame is 50 seconds, so the animation will still loop every 50 seconds. Better than nothing I guess, but I would still like to figure out why it doesn't seem possible to set the loop to anything but infinity.

                           

                          If someone else can confirm they are seeing the same thing I will file a bug report.

                            • Re: Animations loop infinitely ignoring settings
                              LokiEliot Level 1 Level 1 (0 points)

                              Im having the exct same issue, i want an animation to play just the once, and assume setting 'repetitions' to NONE would make it play just the once but it just plays infinitly.It's like the Sticker Sequence options have no effect what so ever. Is this an excode bug? I'm still searchign for an answer.

                              • Re: Animations loop infinitely ignoring settings
                                mrkfolio Level 1 Level 1 (0 points)

                                I am also having the exact same problem - please let me know if you figure out a solution. I do not want to resort having an extra long animation with a bigger filesize as a compromise.

                                  • Re: Animations loop infinitely ignoring settings
                                    CartoonSmart.com Level 3 Level 3 (270 points)

                                    Extra long animation doesn't necessarily mean bigger file size. I didn't realize PNG Animator had a 50 second cap, but just because a single frame is held for 50 seconds, that wont increase the size. 

                                     

                                    Also 3DTOPO, one thing you might want to consider is the user sending the sticker. Its probably safe to assume that the reciever sees the beginning of the animation, (they get a text, open it, sticker begins playing), but for the sender, they might quickly browse up and down their pack, trigger the animation to play, browse away, then go back and the sticker is in its final frame already.  So if the "hook" of what makes your sticker great is in that intro, that might get lost on the sender.  

                        • Re: Animations loop infinitely ignoring settings
                          StuffAndyMakes Level 1 Level 1 (0 points)

                          I'm having the exact same issue. Everything is set correctly in the project. We have a bunch of sticker sequences set to "None" and they just loop infinitely when deployed in the simulator or on an actual device AND on the receiving devices. The system is completely ignoring that property. Like the original poster has done, we've looked through everything and it is most definitely set correctly. The Messages app is just ignoring it. We have verified this is a problem on every device we test.

                           

                          Apple, hello? Clearly a GLARING bug. Makes the sticker packs look craptastic. Please help.

                          • Re: Animations loop infinitely ignoring settings
                            savirash Level 1 Level 1 (0 points)

                            I can still reproduce it under XCode Version 8.3 (8E162).
                            I assume It's a bug. Anyone already commited it to apple?

                             

                            *edit* Open under: 31421460

                            • Re: Animations loop infinitely ignoring settings
                              DrMiller Level 1 Level 1 (0 points)

                              Ditto that with Xcode 8.3, using Motion 5.3 to generate 31 PNGs at 15fps with a total size for all of 49kb. The Repetition is set to None and as described above or Fixed and set to 1 and the animated sequence still animates continuously on simulator and test device.