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
Gradle: The Build System That Loves To Hate You
aurimas
2
140
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
なんで、私がAWS Heroに!? 〜社外の広い世界に一歩踏み出そう〜
minorun365
PRO
6
1.1k
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
160
Forget efficiency – Become more productive without the stress
ufried
0
120
バクラクにおける可観測性向上の取り組み
yuu26
3
410
CAMERA-Suite: 広告文生成のための評価スイート / ai-camera-suite
cyberagentdevelopers
PRO
3
270
ネット広告に未来はあるか?「3rd Party Cookie廃止とPrivacy Sandboxの効果検証の裏側」 / third-party-cookie-privacy
cyberagentdevelopers
PRO
1
130
10分でわかるfreeeのQA
freee
1
3.4k
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
730
日経電子版におけるリアルタイムレコメンドシステム開発の事例紹介/nikkei-realtime-recommender-system
yng87
1
500
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
How STYLIGHT went responsive
nonsquared
95
5.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
GitHub's CSS Performance
jonrohan
1030
460k
Statistics for Hackers
jakevdp
796
220k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
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!