SFSafariViewController doesn't call -canPerformWithActivityItems: for custom activities
| Originator: | futuretap | ||
| Number: | rdar://24140039 | Date Originated: | 12-Jan-2016 01:19 AM |
| Status: | Resolved | Resolved: | iOS 10 |
| Product: | iOS SDK | Product Version: | 9.2 |
| Classification: | UI/Usability | Reproducible: | Always |
When SFSafariViewControllerDelegate provides custom activities using -safariViewController:activityItemsForURL:title: those custom UIActivity objects aren't queried using -canPerformWithActivityItems: when the user selects the activity. Since the usual (and documented) pattern is to implement -canPerformWithActivityItems: to notify the system which activities can actually be performed, SFSafariViewController will display activities that aren't supported on the device. A workaround is to manually filter the list of activities in -safariViewController:activityItemsForURL:title: by querying -canPerformWithActivityItems: for each activity in the list. However, this breaks the documented pattern and makes it more complicated than necessary to support custom activities in SafariViewController. see also: rdar://24138390 / http://openradar.appspot.com/24138390
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!