UIActivityViewController popoverPresentationController differs between iOS 9/10 and doesn't fire delegate methods

Originator:stephanleroux
Number:rdar://27991890 Date Originated:
Status:Open Resolved:
Product:iOS Product Version:10 beta 7
Classification:UIKit Reproducible:Always
 
Area:
UIKit

Summary:
When displaying a UIActivityViewController on iOS 9, the popoverPresentationController property is nil. However, on iOS 10, this property is not nil. Not sure if there was a change in how this works internally but even so, I've noticed that when trying to attach a UIPopoverPresentationControllerDelegate, none of the delegate methods get fired. This makes me think that either this shouldn't be presenting using a UIPopoverPresentationController or there is a bug with firing the delegate methods.

Steps to Reproduce:
(From attached POC)

1. Present a UIActivityViewController
2. Dismiss the UIActivityViewController

Expected Results:
Either:

1. UIActivityViewController instance's popoverPresentationController property is nil
2. UIActivityViewController instance's popoverPresentationController property is not nil but the attached delegate receives messages such as didDismiss

Actual Results:
UIActivityViewController.popoverPresentationController is nil on iOS 9 but not nil on iOS 10. On iOS 10, UIPopoverPresentationControllerDelegate's method for didDismiss is not fired when attached and dismissing the popover.

Version:
iOS 10 beta 7, iOS 9.3

Notes:


Configuration:
iPod Touch 5th gen iOS 10 beta 7, iPhone 6 Simulator iOS 9.3

Attachments:
'UIActivityViewControllerPOC.zip' was successfully uploaded.

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!