First, check with this answer. https://stackoverflow.com/a/47468420/1058199
But if you are interested in scaleable content and want to use an SVG, here's the deal.
While we naturally expect to use an SVG file, Apple has made its support of PDF files handle vector shapes. Try creating a vector shape in your tool of choice and export it as a PDF, then assign it to a new image in an xcasset. Load it and see how it scales.
If you do have a sequence of images that you want to animate, such as image1.png, image2.png, add them to the xcasset and use animatedImageNamed:
Objective-C
UIImage *animatedImage = [UIImage animatedImageNamed:@"imgName" duration:1];
Swift
let animatedImage = UIImage.animatedImageNamed("imgName", duration: 1)
You can also use this approach. https://medium.com/swift-sundae/ultimate-guide-to-gifs-in-ios-f903ab69ddf6
Apple certainly could have made it easier for us.