Xcode-beta (7A176x): SFSafariViewController should supports container view controller

Originator:francis
Number:rdar://22209068 Date Originated:10-Aug-2015 05:11 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-beta (7A176x)
Classification:UI/Usability Reproducible:Always
 
Summary:
Attempt to use multiple SFSafariViewControllers will not work. 

e.g. If we put a SFSafariViewController into a container view controller (e.g. UITabBarController or UISplitViewController), they will not work as expected.

1. When placed inside a UISplitViewController, tap the share button of SFSafariViewController will crash the app.
2. When placed inside a UITabBarController, the tab bar will not be displayed.

Steps to Reproduce:
1. Crash Split View Controller:
  1. Create two SFSafariViewController in split view controller. Configure them to be display at the same time. When the toolbar show a share button, click it. The app show many constraints error, and it will crash with error:

2015-08-10 17:06:15.246 SplitView[70190:263733] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:

2. Tab Bar View Controller

  1. Create multiple SFSafariViewController in tab bar controller 
  2. Tap second tap
  3. The second web page do not show as expected.


Expected Results:
1. It should not have constraints error when tapping Share button
2. It should not crash when user tap Share button
3. Multiple SFSafariViewController should load and display properly

Actual Results:
1. It show many constraints error when tapping Share button inside SplitViewController
2. It crash when user tap Share button inside SplitViewController
3. Only first view controller show web page in a Tab View controller

Notes:
Sample Projects:
- Split View Controller http://cl.ly/1N3B2H2S1Z22
- Tab Bar View Controller http://cl.ly/1n0j1e3x1c3j

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!