Among the examples I have seen so far for iMessage-App extensions, I learned that the only way to send GIF is through creating a MSSticker
and attaching a gif to it for sending. But, after observing some apps. I saw that GIPHY sends GIF through MSMessageTemplateLayout
or MSMessageLayout
. I know this because of how MSSticker
and MSMessageLayout
looks on the screen. You can see that in the images below:
This above image is gif inserted through MSSticker
.
This above image is gif inserted through MSMessageLayout
.
The problem here is MSMessageLayout
doesn't have any method to override. There is no way that I know by which we can insert gif into MSMessageTemplateLayout
and make it play. I tried it. The only way I know is to create a custom MSMessageLayout
which I don't find any examples for.
The major reason for me trying this method is:
MSSticker
So, two humble requests to the community:
MSMessageLayout
, please answer how you did it MSSticker
, please answer how you did it Usually when you send a MSMessage
inside a MSMessageTemplateLayout
, the app icon is shown on the top-left corner (in your screenshot, it doesn't appear) so this makes me think that they probably use insertAttachment(_:)
. In this way the media is handled automatically by iMessage as it has been sent via sharing from any other apps.