I want to copy an image to the UIPasteboard
and paste it e.g. Into WhatsApp.
But this is not working.
If I test it on my device, the pasteboard is not set (old copy content) and ff I check it with the debugger, po pasteboard
always prints << uninitialized >>
.
My source (data is set):
let data = UIImagePNGRepresentation(image)
let pasteboard = UIPasteboard.generalPasteboard()
pasteboard.persistent = true
pasteboard.setData(data!, forPasteboardType: "public.png")