11

I am facing a situation where the "Save to Files" functionality in the UIActivityViewController breaks my navigation. That could be handled by solving the fact that I am currently unable to show two modal views on top of another.

But an even easier solution would be to simply exclude the functionality as it makes no sense for my application. Normally, I would simply exclude the UIActivityType like this:

controller.ExcludedActivityTypes = new [] { UIActivityType.AddToReadingList, UIActivityType.AssignToContact, UIActivityType.CopyToPasteboard, UIActivityType.OpenInIBooks, UIActivityType.Print, UIActivityType.SaveToCameraRoll };

But unfortunately, I cannot exclude the "Save to Files" option.

Does anyone know if this it at all possible?

Demitrian
  • 3,200
  • 1
  • 24
  • 41
  • No selection called SavetoFiles defined in `UIActivityType`. what do you want to achieve? – ColeX Oct 04 '17 at 02:56
  • Did you ever find a solution to this? – sudoExclaimationExclaimation Oct 19 '17 at 21:24
  • No, unfortunately not @PranoyC – Demitrian Oct 19 '17 at 21:29
  • 2
    If you select "Save to Files" then the completion handler returns an `activityType` of `com.apple.CloudDocsUI.AddToiCloudDrive`. But adding that to the list of excluded activities doesn't exclude "Save to Files" from the activity view. – rmaddy Jan 28 '18 at 21:45
  • @rmaddy That’s a really interesting observation. Good find. – Demitrian Jan 29 '18 at 15:24
  • @Demitrian I was hoping I was going to be able to post that as a solution. To bad it doesn't work. I'm using a UIActivityViewController to present options for import so having "Save to Files" appear in iOS 11 makes no sense. Time to submit an enhancement request to Apple. – rmaddy Jan 29 '18 at 16:54
  • @rmaddy Makes sense. The feature also makes no sense for the application which I am developing. I have requested the same enhancement, but heard nothing further. But I guess that Apple would perhaps look into the matter at hand if more people asks the same thing. So by all means, go ahead :) – Demitrian Jan 29 '18 at 20:24

1 Answers1

0

As of iOS 14, there is still no way to prevent the "Save to Files" option from showing up, and iOS is probably not going to change this even though it was brought to there attention a long time ago.

Others have run into this issue as well.

Although you can't do this using normal means-"ExcludedActivityTypes", There might be a work around for this though

Saamer
  • 4,687
  • 1
  • 13
  • 55