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
460
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
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
250
スクラムチームを立ち上げる〜チーム開発で得られたもの・得られなかったもの〜
ohnoeight
2
350
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
130
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
0
110
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
160
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1k
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Why Our Code Smells
bkeepers
PRO
334
57k
Thoughts on Productivity
jonyablonski
67
4.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
The Invisible Side of Design
smashingmag
298
50k
A Tale of Four Properties
chriscoyier
156
23k
A Modern Web Designer's Workflow
chriscoyier
693
190k
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!