3 Replies
      Latest reply on Dec 13, 2019 8:46 AM by Striderzet
      Striderzet Level 1 Level 1 (0 points)

        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)




        //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?