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
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
150
Storage Browser for Amazon S3
miu_crescent
1
210
第3回Snowflake女子会_LT登壇資料(合成データ)_Taro_CCCMK
tarotaro0129
0
200
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
2
110
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
350
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
190
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
180
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
550
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
17
13k
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
170
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
130
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Writing Fast Ruby
sferik
628
61k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Faster Mobile Websites
deanohume
305
30k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
98
The Cost Of JavaScript in 2023
addyosmani
45
7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Practical Orchestrator
shlominoach
186
10k
Become a Pro
speakerdeck
PRO
26
5k
Automating Front-end Workflow
addyosmani
1366
200k
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!