WWDC 2015

Introducing safari View Controller.

In iOS9 , we have a "in-app browser" view controller called Safari view Controller.

It shares many attributes of native safari app including:

  • cookies shared with native safari
  • passowrd auto-fill
  • credit card auto-fill
  • contact card auto fill
  • safari reader ( and its font customization)
  • Content Blocking ( select certain type of elements to not show in the webView )( also new feature of iOS 9)

Pro :

  • fast to setup

Cons:

  • Read-only url on the navigation bar
  • Almost same UI Layout as Native safari (tint color adopts host app's tint color)

WKWebView updates in iOS 9

//securely load local files
loadFileURL(URL:NSURL, allowingReadAccessToURL readAccessURL:NSURL) -> WKNavigation?

//load data locally without remote server
loadData(data: NSData, MIMEType: String, characterEncodingName: String, baseURL:NSURL) -> WKNavigation?

var customUserAgent:String?