What is the main advantage of using SFSafariViewController?

With SFSafariViewController, you can use nearly all of the benefits of viewing web content inside Safari without forcing users to leave your app.

The majority of apps just need to provide a generalized web viewing experience. This is the perfect scenario for the safari view controller.

Before SFSafariViewController, the browsing experience was inconsistent across different apps, which may confuse the user. Some interfaces may also lack the things users expect, such as a progress bar indicating how much of the page is loaded. You don't have access to all of Safari's features. This includes the reader view, the iCloud keychain for autofill capabilities, and more.

If you wanted to have those features before iOS 9, you were forced to have the user leave your app entirely by opening the content inside Safari. SFSafariViewController solves every one of these problems.

For more see here


In case of [UIApplication openURL:], Safari is launched and your app is no longer in foreground and, generally, is not guaranteed to be running. In contrast, SFSafariViewController is a part of your app and you retain some control over it as a UIViewController or with SFSafariViewControllerDelegate methods. Which one to use depends on what you want to achieve. There is also WKWebView which gives you more control over the content and navigation but lacks some features of Safari such as content blocking.