Using native sharing text feature by UIActivityViewController. Its successfully posting on share in a post, able to see in my LinkedIn page but showing error message in UI.
let text = "This is the text....."
let textShare = [ text ]
let activityViewController = UIActivityViewController(activityItems: textShare , applicationActivities: nil)
activityViewController.popoverPresentationController?.sourceView = self.view
self.present(activityViewController, animated: true, completion: nil)
Attached image below, please have a look.