I stucked with one problem can you solve me?
Actually I'm implementing custom sticker pack for imessage app. For that I implemented all the things its working fine but only one case.
So if I add .jpg or .png format files its displaying and sending perfectly. If i add .gif format images for stickers it's not animating while displaying time.
Displaying purpose i used collection view MSStickerView.
My code is:
func LoadStickers()
{
    for i in 1...5 {
        if let url = Bundle.main.url(forResource: "nature\(i)", withExtension: "gif") {
            do {
                let sticker = try MSSticker(contentsOfFileURL: url, localizedDescription: "")
                stickers.append(sticker)
            } catch {
                print(error)
            }
        }
These are my collection view delegates:
func numberOfSections(in collectionView: UICollectionView) -> Int {
    return 1
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
    return stickers.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "StickerPackCell", for: indexPath) as! FemaleStickerPackViewCell
    // Configure the cell
    cell.femaleStickerPack.sticker = stickers[indexPath.row]
    return cell
}
This is UICollectionViewCell: 
class StickerViewCell: UICollectionViewCell {
 @IBOutlet var femaleStickerPack: MSStickerView!
}
This is extension:
extension UIViewController
{
   func addTo(appViewController host:MSMessagesAppViewController)
   {
    willMove(toParentViewController: host)
    host.addChildViewController(self)
    view.frame = host.view.bounds
    view.translatesAutoresizingMaskIntoConstraints = false
    host.view.addSubview(view)
    view.topAnchor.constraint(equalTo: host.view.topAnchor).isActive = true
    view.bottomAnchor.constraint(equalTo: host.view.bottomAnchor).isActive = true
    view.leftAnchor.constraint(equalTo: host.view.leftAnchor).isActive = true
    view.rightAnchor.constraint(equalTo: host.view.rightAnchor).isActive = true
    didMove(toParentViewController: host)
   }
}
So I want to store .gif format stickers can anybody help me please I tried lot of ways but I failed to get.
Thanks in advance.
 
    