Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
jspatch分享
Search
passol1988
March 11, 2017
Programming
32
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
jspatch分享
passol1988
March 11, 2017
Transcript
17 slides
objc runtimeګᅾๅෛ
ObjCᇙ ✦ձ֜Cᑕଧݢզፗള᭗ᬦObjective-Cᖫᦲ ✦Objective-CጱᶎݻဩრԭSmalltalkၾ௳փ᭓
ၾ௳փ᭓ [receiver message] objc_msgSend(receiver, @selector(message)); ((void (*)(id, SEL))(void *)objc_msgSend)((id)receiver,sel_registerName("message"));
ၾ௳փ᭓ id objc_msgSend(id receiver, SEL _cmd, ...) receiver ၾ௳ളݑᘏ _cmd
ڍහጱොဩݷ,Ӟᛱٟ֢selector … ݢݒ݇හڜᤒ
ၾ௳හഝᕮ id objc_msgSend(id receiver, SEL _cmd, ...) receiver ၾ௳ളݑᘏ _cmd
ڍහጱොဩݷ,Ӟᛱٟ֢selector … ݢݒ݇හڜᤒ
ᔄጱᕮ objcਫֺ objc-object objc-class isaᰒ objc-classᆿ isaᰒ ڍහݷ ڍහොဩ ړݎᤒ
ړݎᤒ static int function(objc * self, SEL message, …) {
…code } id objc_msgSend(id receiver, SEL _cmd, ...) ىᘶڍහݷڍහᰒIMP
ၾ௳փ᭓ ොဩᥴຉ resolveInstanceMethod resolveClassMethod ள᭛ၾ௳ݎ forwardingTargetForSelector ຽٵၾ௳ݎ methodSignatureForSelector forwardInvocation
ԧᥴᬩᤈጱঅ॒ ग़ᖀಥ Method Swizzling
JavaScriptCore JSContext ᔄ֒ԭ window JSValue ۸౮ݱ զڹጱ᭗מොୗ ڥአiframeٖୌjsጱොୗ JSExportܐᦓ
JSContext JSContext *context = [[JSContext alloc] init]; context[@"hello"] = ^(NSString
*msg) { NSLog(@"hello %@", msg); }; [_context evaluateScript:@"hello('word')"]; //output hello word
JSValue JSContext *context = [[JSContext alloc] init]; context[@"hello"] = ^(NSString
*msg) { NSLog(@"hello %@", msg); }; [_context evaluateScript:@"hello('word')"]; //output hello word
JSPatchսᗌᅩ js᭗አฃ ᒧݳຎਭ໐ᥢ ඪ೮block ӧඪ೮ios6
ӷᐿጱᕹӞ ڥአJSBoxingᤰ(୩୧, ᰒ҅ᔄ)
JPBoxing js᭗አฃ
JPBoxing js᭗አฃ
JPBoxing Objective-C Javascript formatOCToObj() formatOCToJS() formatOCToJS()
More Decks by passol1988
See All by passol1988
callkit研究
passol1988
0
64
RN分享
passol1988
0
26
Other Decks in Programming
See All in Programming
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
120
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
270
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
220
joyful-journey-spring-boot.pdf
hollycummins
0
130
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
510
エージェントの管理もエージェントに – herdr-core と自作バックログで作る司令塔 –
nearme_tech
PRO
2
170
AI駆動TDD ― 2026年10月版
hrmstrsmgs
0
120
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
440
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
350
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
Agentic AI with the Power of Jakarta EE
ivargrimstad
0
240
Featured
See All Featured
Paper Plane
katiecoart
PRO
6
55k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
590
Paper Plane (Part 1)
katiecoart
PRO
3
12k
The Cost Of JavaScript in 2023
addyosmani
56
10k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
A Soul's Torment
seathinner
9
4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
360
Between Models and Reality
mayunak
4
610
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
660
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.8k
For a Future-Friendly Web
brad_frost
184
11k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k