I'm trying to remove all activity types start with com.apple.UIKit.activity.Open.Copy
from UIActivityViewController
.
I tried following but didn't get success, anybody does this?
func showShareActivity(videoURL : NSURL, onComplete:@escaping (Bool, UIActivityType?, Error?)->()) {
let activityVC = UIActivityViewController(activityItems: [videoURL], applicationActivities: nil)
activityVC.excludedActivityTypes = [UIActivityType(rawValue: "com.apple.UIKit.activity.Open.Copy.*")]
activityVC.completionWithItemsHandler = { (activity, success, items, error) in
onComplete(success, activity, erro
}
appDelegate?.window.rootViewController?.present(activityVC, animated: true, completion: nil)
}
Note: When I try to exclude one by one then it works but I want to remove all together (Some of them I may don't know). (Swift/ObjC any solution works.)
com.apple.UIKit.activity.Open.Copy.com.apple.iMovie
com.apple.UIKit.activity.Open.Copy.com.apple.itunesu
com.apple.UIKit.activity.Open.Copy.net.whatsapp.WhatsApp
Basically those are all that starts with Import with
or Copy to
text, please refer below image.
I think Evernote app does the same.