UIActivityViewController: Exclude non-Apple sharing extensions?

筅森魡賤 提交于 2019-12-01 18:00:25

问题


I would like to prevent my app to share its content to certain other apps using the extensions mechanism. For instance, I want the user to be able to share a link, but not with the Gmail app.

My understanding of the documentary is that the following should work:

// vieController previously initialised like this: UIActivityViewController(activityItems: [provider], applicationActivities: nil)

viewController.excludedActivityTypes = ["com.google.Gmail.ShareExtension"]

This doesn't work. Am I missing something? Are non-Apple activity types not working with this mechanism?


回答1:


Apparently, since iOS 8.1 this is not possible anymore (either a bug or intended behaviour), see: http://johnszumski.com/blog/excluding-third-party-apps-from-ios-8-share-sheet



来源:https://stackoverflow.com/questions/32522977/uiactivityviewcontroller-exclude-non-apple-sharing-extensions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!