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.1k
Dependency Injection in iOS Apps
yashigani
2
440
Multiple layout with UITableViewCell
yashigani
1
3.3k
Lazy stored property
yashigani
3
2k
Code reviewing in iOS app development
yashigani
9
4.3k
Useful 3 techniques developing in iOS Apps
yashigani
0
1.5k
Introduction to WebKitPlus
yashigani
2
2.1k
Types in Swift
yashigani
5
2.3k
Swift with apps by Hatena
yashigani
13
29k
Other Decks in Technology
See All in Technology
障害対応をちょっとずつよくしていくための 演習の作りかた
heleeen
0
160
Google Cloud Next '24でブログを10本書いた方法と勉強会を沸かせた方法
yasumuusan
0
290
私が trocco を推す理由
__allllllllez__
1
220
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
自己改善からチームを動かす! 「セルフエンジニアリングマネージャー」のすゝめ
shoota
6
440
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
890
Google Cloud Next '24 Recap(Cloud Run/k8s)
mokocm
0
130
エンジニア候補者向け資料2024.04.24.pdf
macloud
0
3.3k
生産性向上チームの紹介
cybozuinsideout
PRO
1
870
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
350
KubeConにproposalを送りたい人へのアドバイス
sat
PRO
3
250
競技としてのKaggle、役に立つKaggle
yu4u
3
430
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
42k
A Philosophy of Restraint
colly
197
16k
Optimizing for Happiness
mojombo
370
69k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
Code Review Best Practice
trishagee
55
15k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
116
18k
What’s in a name? Adding method to the madness
productmarketing
PRO
16
2.6k
The Brand Is Dead. Long Live the Brand.
mthomps
49
28k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
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!