@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

iOS9の新しいWebView (SFSafariViewController) がすごそうで,気をつけないとやっかいかも

アプリ内のWebViewでiOSSafariとクッキーやウェブサイトのデータを共有したり,オートフィル,リーダー表示機能をつけたりできるみたい.

ログイン状態をSafariからアプリのWebViewに引き継ぐことが可能になる.ユーザーからは引き継ぐかどうか選べないけども.

SFSafariViewController for iOS

You can use SFSafariViewController to display web content within your app. The Safari View Controller shares cookies and other website data with Safari, and has many of Safari's features, like Safari AutoFill and Safari Reader. Unlike Safari itself, the Safari View Controller UI is tailored for displaying a single page, featuring a Done button that'll take users right back where they were in your app.

Consider replacing your WKWebView or UIWebView-based browsers with SFSafariViewController if your app displays web content but does not customize that content.

Safari 9.0

Safari Services Framework

The Safari Services framework (SafariServices.framework) includes the following enhancement.

SFSafariViewController can be used to display web content within your app. It shares cookies and other website data with Safari, and has many of Safari's great features, such as Safari AutoFill and Safari Reader. Unlike Safari itself, the SFSafariViewController UI is tailored for displaying a single page, featuring a Done button that takes users back to where they were in your app.

If your app displays web content, but does not customize that content, consider replacing your WKWebView or UIWebView-based browsers with SFSafariViewController.

iOS 9.0

Twitterクライアントとか,ニュース系,RSSリーダーあとで読む系のアプリで,リンクをリーダービューで表示できるようになるとうざい広告とか排除できて良さそう.

あと,個人的にはリーダービューで表示した内容をAppleWatchに転送したいと思ったけど,このサイズで読み続けるのはしんどいか...

entersReaderIfAvailableって引数があるから事前に有効にすることができそう.

let vc = SFSafariViewController(URL: url, entersReaderIfAvailable: true)

www.hackingwithswift.com