Hello,
I have come across what I believe to be a bug in iOS 14 regarding UIActivityViewController.excludedActivityTypes. Adding an array of UIActivity.ActivityType objects to this property worked correctly under iOS 13, but now fails under iOS 14. I am testing this in both Xcode 11.4 compiling under the iOS 13 SDK (where it works) and on Xcode 12.1 compiling under the iOS 14 SDK (where it fails).
The UIActivity.ActivityType(s) that I add to the array are correctly removed from the share sheet when it is presented under iOS 13, but they show up when the share sheet is presented under iOS 14. This is causing us problems, because some share extensions are simply not compatible with the data that our app exposes and we wish to exclude them but because of this bug, we are unable to.
Can anyone shed some light on whether they are seeing this issue as well under iOS 14? And if you are not, would you mind sharing your code that sets the exception? An example of ours is below:
let activityVC = UIActivityViewController(activityItems: activityItems, applicationActivities: applicationActivities)
activityVC.excludedActivityTypes = [UIActivity.ActivityType.init("com.apple.reminders.RemindersEditorExtension")]
When this code is used, the Reminders app still shows up in the list. We have tried this with other share extensions as well (not just Apple ones) and the result is the same.