1

I've an iOS app that will display & play Lottie animations. The animations I've successfully used are from www.lottiefiles.com All the animations from there work.

I've created my own animation in After Effects and exported using BodyMovin then tried to display it, but nothing is displayed.

Xcode complains that images are missing, but it never asked for (and doesn't have) images for the JSON animations downloaded from www.lottiefiles.com and the app still plays them.

I added the images, but still nothing is displayed and still complains the images are missing.

I tried the different settings of BodyMovin, such as: 'Original Asset Names - Export assets with their original project names' & 'Include in JSON - Include rasterized images encoded in json'. Neither of these have fixed the problem.

I tried another AE composition created by someone else and that didn't work either.

I used BodyMovin' to create a demo.html to see if the animation displays in html, which it does, so I know the animation works.

It seems that JSON files from www.lottiefiles.com will work in the app, but JSON files I render from After Effects won't.

Andy4202
  • 31
  • 5

1 Answers1

1

Problem Solved.

If Xcode is complaining that it is missing the png images, don't add your png images to assets.xcassets. Add the png images to the same folder as your rendered JSON file.

To make sure your JSON file has the required png files listed within it, when you open the BodyMovin extension in After Effects go to the settings of your selected composition, under 'Assets' select the radio button of 'Original Asset Names - Export assets with their original project names' and then render.

Andy4202
  • 31
  • 5