I'm having trouble excluding custom UIActivityType
s from UIActivityViewController
I have…
extension UIActivityType {
static let fbMessenger = UIActivityType("com.facebook.Messenger.ShareExtension")
static let telegram = UIActivityType("ph.telegra.Telegraph.Share")
}
and then
let activityController = UIActivityViewController(activityItems: <sharingItems>, applicationActivities: nil)
activityController.excludedActivityTypes = [.postToFacebook, .fbMessenger, .telegram]
present(activityController, animated: true)
With the excluded types above, the presented share sheet correctly excludes Facebook, but still shows the 2 custom types (Messenger and Telegraph)
Interestingly, checking the activityType
in completionWithItemsHandler
when selecting either of the 2 that I was trying to exclude shows they do have the raw values as above.
Can custom UIActivityType
s be excluded? Any thought on what I'm missing?