Gifs work, but if you want to make them high frame rate and high resolution, they can get quite large in filesize, especially if you want to support transparency (and still it wont support alpha transparency). Just on an iOS app, you would have to export the animation gif in 1x, 2x, 3x resolutions.
Lottie uses json file that contains svgs and the animation, which can be compressed quite well, always display in the right resolution and whatever size you desire.