Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIActivityViewController: Exclude non-Apple sharing extensions?

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?

like image 772
scrrr Avatar asked Sep 11 '15 11:09

scrrr


1 Answers

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

like image 120
emem Avatar answered Nov 11 '22 22:11

emem