This is my code to copy an image on to the general UIPateBoard and paste it:
//image paste code
let pb = UIPasteboard.general
let imgData : Data? = image.pngData()
pb.setData(imgData!, forPasteboardType: kUTTypePNG as String)
This will not work unless full acess is granted. Even if i declare it this way:
let pb = UIPasteboard.init(name: "New", create: true)
OR:
//try to declare it local after its created
pb.setItems([["Key":"Data"]], options: [UIPasteboard.OptionsKey.localOnly : true])
I am still not able to paste. Do I need to use the paste function from the UIInputViewController from the custom keyboard?