Safari View Controller does not load pages in Action Extensions

Originator:martingordon
Number:rdar://28243637 Date Originated:9/10/2016
Status:Open Resolved:
Product:iOS Product Version:iOS 10 GM seed
Classification:Serious Bug Reproducible:Always
 
Area:
Safari Services

Summary:
When attempting to present an SFSafariViewController from an extension, the controller is presented, but the URL bar is blank, the navigation bar is misplaced and mis-sized, and the URL is not loaded.

Steps to Reproduce:
1. Using the attached project, run the App target (SafariViewControllerInExtension).
2. Switch to Safari and open a web page.
3. Tap the "Share" button, scroll the bottom pane to the right, choose "More", and enable the "Direct Open", "Open with Alert", "Open with Action Sheet" extensions.
4. Tap the "Direct Open" or "Open with Action Sheet" extensions.

Expected Results:
Safari View Controller should load the web page.

Actual Results:
The Safari View Controller is shown, but the URL bar is blank, the navigation bar is misplaced and mis-sized, and the URL is not loaded.

Version:
iOS 10 GM seed

Notes:
An additional extension, "Open with Alert", is included in the project to demonstrate the workaround I have found to enable Safari View Controller to work on iOS 10. This is obviously not ideal long-term workaround, as it requires my end users to perform an additional tap on every URL they want to open via my app's extension.

Configuration:
iPhone 5s, iPad Pro, iOS Simulator

Attachments:
'SafariViewControllerInExtension.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!