I make a SLComposeViewController everything works fine until I want to share my Image, there's alot things to click including " import to whatsapp, import to Instagram " and etc.
If I clicked on this my apps will stuck. So I want to exclude all this import things.
The question is how can I ? because in UIActivityType. there's no choice of exclude this module
func shareQR(){
if filename != nil {
let imageToShare = [ filename ]
let activityViewController = UIActivityViewController(activityItems: imageToShare, applicationActivities: nil)
activityViewController.popoverPresentationController?.sourceView = self.view // so that iPads won't crash
activityViewController.excludedActivityTypes = [ UIActivityType.airDrop ]
self.present(activityViewController, animated: true, completion: nil)
}
}
EDIT IMAGE
There's bunch of thing that useless here like "Copy to" & "Import with" I just need like "Instagram" "Whatsapp" and etc.
I need to exclude all of this because it's useless and if this icon clicked will freeze my apps.

As of iOS API of
UIActivityViewControllerThere is no extra methods for excluding share activities (Which is presented on first row), Only user have choice to enable/disable by clicking More on first row then disable switch.