I recently saw this project in which a user can tap on a GIF from a custom keyboard and they would see a \"copied\" toolip appear. I have one question:
Try using this code:
let image = UIImage(named: "myimage.png") UIPasteboard.generalPasteboard().image = image;
you can find out how this works here!
Hope this helps
Swift 5.1
UIPasteboard.general.image = image