I wish to create a UIActivityViewController
which will exclude some of the native share features including Facebook and Twitter Share. But the Facebook share is still available as a ShareExtention
.
I create the following :
activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:applicationActivities];
and excluded Facebook by setting the excluded Activity types.
activityViewController.excludedActivityTypes = @[
UIActivityTypeAddToReadingList,
UIActivityTypeAssignToContact,
UIActivityTypePrint,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeCopyToPasteboard,
UIActivityTypeAirDrop,
UIActivityTypePostToFacebook,
UIActivityTypePostToTwitter
];
When running on my iPhone the Facebook icon appears despite being excluded.
Investigating how this is happening I see that the completion handler for the activity controller is returning the activityType = com.facebook.Facebook.ShareExtension
, not UIActivityTypePostToFacebook
. Also when selecting the more button in the activity controller there is a toggle for Facebook as for other apps which make use of the Share convention.
Why is Facebook using the shareExtention
when Twitter is not, and why can I not exclude it using the excluded activities?
Note: I have tested this on several devices but the issue only exists on one device which is running 8.1.3.
Thanks