I have implemented sharing to insta stories which are working fine for iOS 12 but not working on iOS 13.
I have tried/verified following points
- Verified URL Scheme
- Checked changes to UIPasteBoard
- Verified asset urls
Everything is as per documentation: https://developers.facebook.com/docs/instagram/sharing-to-stories/
if schemeAvailable(scheme: "instagram-stories://share"){
let pasteboardItems = ["com.instagram.sharedSticker.backgroundImage":UIImagePNGRepresentation(postImage!)!,
"com.instagram.sharedSticker.contentURL":"http://google.com"] as [String : Any]
UIPasteboard.general.setItems([pasteboardItems])
UIApplication.shared.open(URL(string: "instagram-stories://share")!, options: [:], completionHandler: { (finished) in
print("")
})
}else{
print("Can't open URL")
}