UIActivityViewController:排除非Apple共享扩展? [英] UIActivityViewController: Exclude non-Apple sharing extensions?
问题描述
我想阻止我的应用使用扩展机制将其内容分享给某些其他应用。例如,我希望用户能够共享链接,但不能与Gmail应用分享。
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.
我对纪录片的理解是以下内容应该有效: / p>
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"]
这不起作用。我错过了什么吗?非Apple活动类型是否不适用于此机制?
This doesn't work. Am I missing something? Are non-Apple activity types not working with this mechanism?
推荐答案
显然,自iOS 8.1以来,这是不可能的(无论是错误或预期行为),请参阅: http:/ /johnszumski.com/blog/excluding-third-party-apps-from-ios-8-share-sheet
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
这篇关于UIActivityViewController:排除非Apple共享扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!