0

I am using a UIActivityViewController to share a invitation text to my app. I am trying to exclude all activities with the action category besides Notes App. I am unable to exclude "Save to Files" option.

  1. Is there any way to exclude the view with action activities directly?
  2. How can i exclude "Save to Files" activity option?

    @IBAction func inviteAction(_ sender: UIBarButtonItem) {
    let inviteText = "..."
    let actCont = UIActivityViewController(activityItems: [inviteText], applicationActivities: [])
    //Exclude action activities types from the list
    actCont.excludedActivityTypes = [ .print, .assignToContact, .saveToCameraRoll, .copyToPasteboard,
                                      .addToReadingList,
                                      UIActivityType(rawValue: "com.apple.mobilenotes.SharingExtension"),
                                      UIActivityType(rawValue: "com.apple.CloudDocsUI.AddToiCloudDrive")]
    self.present(actCont, animated: true, completion: nil)
    }
    
Amal T S
  • 3,327
  • 2
  • 24
  • 57
Ariel Antonio Fundora
  • 1,330
  • 15
  • 20
  • Please see https://stackoverflow.com/questions/46540372/uiactivityviewcontroller-unable-to-exclude-save-to-files-in-excludedactivity?s=1|124.1458 – rmaddy Sep 07 '18 at 23:31

1 Answers1

1

As of now, I think there is no way to exclude the " Save To Files" UIActivityType. Apple may do something for this in mere future

Catherine
  • 654
  • 5
  • 15