Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
What's new WebKit.framework
Search
yashigani
June 21, 2014
Technology
2
1.4k
What's new WebKit.framework
yashigani
June 21, 2014
Tweet
Share
More Decks by yashigani
See All by yashigani
Hatena Engineer Seminar #10
yashigani
0
2.2k
Dependency Injection in iOS Apps
yashigani
2
470
Multiple layout with UITableViewCell
yashigani
1
3.4k
Lazy stored property
yashigani
3
2.1k
Code reviewing in iOS app development
yashigani
9
4.4k
Useful 3 techniques developing in iOS Apps
yashigani
0
1.5k
Introduction to WebKitPlus
yashigani
2
2.3k
Types in Swift
yashigani
5
2.3k
Swift with apps by Hatena
yashigani
13
29k
Other Decks in Technology
See All in Technology
新卒1年目、はじめてのアプリケーションサーバー【IBM WebSphere Liberty】
ktgrryt
0
130
ゼロからわかる!!AWSの構成図を書いてみようワークショップ 問題&解答解説 #デッカイギ #羽田デッカイギおつ
_mossann_t
0
1.5k
dbtを中心にして組織のアジリティとガバナンスのトレードオンを考えてみた
gappy50
0
280
生成AIのビジネス活用
seosoft
0
110
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
680
Unsafe.BitCast のすゝめ。
nenonaninu
0
200
月間60万ユーザーを抱える 個人開発サービス「Walica」の 技術スタック変遷
miyachin
1
140
デジタルアイデンティティ人材育成推進ワーキンググループ 翻訳サブワーキンググループ 活動報告 / 20250114-OIDF-J-EduWG-TranslationSWG
oidfj
0
540
AWSマルチアカウント統制環境のすゝめ / 20250115 Mitsutoshi Matsuo
shift_evolve
0
120
メールヘッダーを見てみよう
hinono
0
110
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
250
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
170
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
Optimizing for Happiness
mojombo
376
70k
GitHub's CSS Performance
jonrohan
1030
460k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Speed Design
sergeychernyshev
25
740
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Writing Fast Ruby
sferik
628
61k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
A designer walks into a library…
pauljervisheath
205
24k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
Transcript
ϦϑΝϨϯε͔ΒಡΈղ͘ WebKit.framework @yashigani Cocoaษڧձؔ #56
@yashigani
None
None
None
–Mattt Thompson “UIWebView is dead. Long live WKWebView.”
WKWebView is Կʁ
WKWebViewͷਖ਼ମ • Safari/Mobile Safariͱಉ͡ͷ͕͑Δ • ϞμϯͳΠϯλʔϑΣʔε • WebKit 2 APIϕʔε
• ࣮UIWebViewWebViewҧ͏API
WebKit 2 API • ϚϧνϓϩηεʹରԠͨ͠API • WebKit 1ͱඇޓ • Safari
5.1(07/2011)~
࣮͜ͳ͍ͩൃදͨ͠ • @kyoto.ͳΜ͔ • WebKit 2 APICϕʔεͰʙͬͯͨ͠ • ՈؼͬͯϦϙδτϦݟͨΒͦΜͳ͜ͱͳͯ͘ ݁ߏͪΌΜͱͯͨ͠
• #expectWWDC
ΊͰ͍ͨʂ
WKWebView • iOS/OS XͰڞ௨ • ϞμϯͳΠϯλʔϑΣʔε • property/delegate • Ϛϧνϓϩηε
ߏ • WKWebView • WKUIDelegate • WKNavigationDelegate • WKWebViewConfiguration •
WKPreferences • WKUserContentController
WKWebView • Built-in Gesture • KVO compliant • title/URL/loading/estimatedProgress… •
backForwardList • WKUIDelegate/WKNavigationDelegate
WKUIDelegate • alert()ͷॲཧΛࣗલͰ • ࣗͰॲཧͯ͠ɼcompletionHandlerΛݺͿ
WKNavigationDelegate • shouldStart…/didFinish… • UIDelegateͱಉ༷ʹdecisionHandlerͰॲཧ • ϩʔυͷਐḿΛࡉ͔͘औಘͰ͖Δ
WKWebViewConfiguration • WKPreferences/WKProcessPool/ WKUserContentController • WKWebViewΛॳظԽ͢Δͱ͖ʹ͢ • ෳWKWebViewΛ࡞Δͱ͖ʹڞ༗Ͱ͖Δ
WKPreferences • JavaScriptͷΦϯΦϑ • ϑΥϯταΠζ • ಈը࠶ੜΛΠϯϥΠϯͰ • ઃఆUser Defaultsʹอଘ͞ΕΔ
WKUserContentController • ϩʔυ͢ΔUser ScriptͷՃ/আ • User ScriptͷHandlerΛొ • User Script͔ΒϝοηʔδΛૹΕΔ
σϝϦοτ
stringByEvaluatingJavaScriptFromString: ͕ແ͍
None
͡Ό͋Ͳ͏͠Ζͱ • User ScriptͰͳΜͱ͔͠Ζͱ͍͏͜ͱʁ • Easy app-webpage communication • ͪΖΜΦʔϓϯͳ࣮ʹ͋Δ
• evaluateJavaSctipt:completionHandler: • ৭ʑࢼ͚ͨ͠Ͳ… #͍ͯͩ͘͠͞
OS X͔Β͢Δͱ… • ΊͬͪΌऑମԽ • WebViewʹ͋Δdelegateͬͱ͋Δ • WebFrameʹΞΫηεͰ͖ͳ͍͠… • ͪΖΜJSContext͑ͳ͍
ٙ • લճͷWWDCͰJavaScriptCore.frameworkΛ ։์ͨ͠ҙਤ͕Θ͔Βͳ͍ • ಛʹ࠷ۙWebKitͷJSEngine͍͢͝վྑ ͞Ε͍ͯΔ • ϑΟʔυόοΫ࣍ୈͰͬͱ։์͞ΕΔՄ ೳੑ͕ʁ
·ͱΊ • UIWebView is dead. Long live WKWebView. • Ϛϧνϓϩηε+Ϟμϯ
API • ࠓͷͱ͜Ζظ΄ͲͰͳ͍(ͱࢥ͏) • ͨͩ͠ྗΛೖΕ͍ͯΔͷ͔֬ • ظͯ͠ΔਓBug Reportʹཁग़ͦ͏ʂ
ؔ࿈ • http://www.webkit.org • https://github.com/webkit/webkit • Introducing the Modern WebKit
API • http://nshipster.com/ios8/
Thank you!