Someone posted a similar issue in another forum (https://forums.developer.apple.com/thread/51131), but I thought it might be useful to post it here in case someone else is having the same problem.
When setting the mediaFileURL property of the MSMessageTemplateLayout object to an animated GIF or animated PNG, the image displayed in the message bubble doesn't animate. (You only see a single frame of the animation.)
I've filed a report on this: rdar://27481376
If someone has discovered a work-around, please let us know.
Thanks,
-Michael