SFSafariViewController (and Safari) should open Universal Links in app by default

Originator:james.reggio
Number:rdar://23612919 Date Originated:11/19/2015
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 9.1
Classification:Enhancement Reproducible:Always
 
[Want to discuss? Get in touch with me @jamesreggio.]

Universal Links are a clear improvement to the cross-app navigation story in iOS; however, it feels like Apple is not fully committed to their success, because Universal Links don't open the registered app by default when tapped in either Safari or SFSafariViewController. Instead, the ability to "Open in [Native App]..." is buried in a tap-to-hold context menu, which will rarely ever be discovered by ordinary users.

The impact of this is worsened for apps that adopt SFSafariViewController as their WebView. SFSafariViewController doesn't provide programmatic access to user navigation events within the browser, so the host app is no longer able to intercept navigation to pages that have a native, in-app equivalent. If Universal Links automatically 'triggered' the associated app when tapped in SFSafariViewController, the host app would receive notification via a NSUserActivity, but right now, this is only possible if the user taps-and-holds the link. As such, if Twitter adopted SFSafariViewController, it would be possible to browse around twitter.com in the WebView inside of the Twitter app, which is an extremely poor user experience.

Finally, the lack of first-class support for Universal Links encourages the 'bad behavior' on the part of web developers, who will often attempt navigation via custom scheme before allowing the browser to navigate to a designation link. (Witness this on foursquare.com when browsing on an iPhone.) This is complex, error prone, and seems like a development practice that should have died with the advent of Universal Links.

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!