SLServiceTypeFacebook' was deprecated in iOS 11.0

前端 未结 1 892
野性不改
野性不改 2021-01-17 16:44

I\'m working on a project in xcode 9 and one of my previous codes giving a warning saying the code is been deprecated, where it does not trigger the action. The code as bell

相关标签:
1条回答
  • 2021-01-17 16:50

    The Facebook, Twitter, and Other apps options have been removed in the Settings app.

    That apps will now be treated like other apps, using the iOS sharing extensions

    let share = [image, text, url]
    let activityViewController = UIActivityViewController(activityItems: share, applicationActivities: nil)
    activityViewController.popoverPresentationController?.sourceView = self.view
    self.present(activityViewController, animated: true, completion: nil)
    

    You can also use third party SDK for individual sharing

    Facebook Sharing Doc

    Twitter Sharing Doc

    0 讨论(0)
提交回复
热议问题