I need to exclude .saveToCameraRoll
from a UIActivityViewController
but it is ignoring excludedActivityTypes
.
activityVC = UIActivityViewController(activityItems: [imgUrl], applicationActivities: activities)
activityVC!.excludedActivityTypes = [.saveToCameraRoll]
I also tried creating a "custom" UIActivty and exclude it:
let saveToCameraRollActivity = UIActivity.ActivityType.init(rawValue: "\(UIActivity.ActivityType.saveToCameraRoll.rawValue)")
activityVC!.excludedActivityTypes = [saveToCameraRollActivity]
Both ways have no effect, the Save Image option is still displayed. What is the point of being able to exclude activity types if they are ignored?
The header says:
// default is nil. activity types listed will not be displayed
excludedActivityTypes: [UIActivity.ActivityType]?
I need to use my own Save Image because standard one is not respecting the file name (even though it is shown with the file icon and I am using a URL).