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?
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