How to access all the Objective-C APIs using JSI
summary
Describes concrete JSI code that projects the Objective‑C runtime into JS via a JSI host object, showing serialisable access (NSString constants like NSStringTransformLatinToHiragana), non‑serialisable objects, class lookup with NSClassFromString, symbol lookup with dlsym, and method invocation by building selectors. Provides an implementation in shirakaba/react-native-native-runtime and pragmatic notes: bootstrap via RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD, marshal closures, use JSI utils, expect startup race conditions and intermittent crashes from strong/weak ref memory issues that need C++ review.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:23Background
- 2:54What should we care
- 4:26JSI module setup
- 10:32JSI support
- 16:47ObjectiveC runtime projection
- 22:25ObjectiveC Serializable API
- 25:09ObjectiveC NonSerializable API
- 28:26Implement Constructor
- 34:13Implement Invoke
- 35:18Confession
- 36:39Future ideas
related talks
21mReact Native under the hood
22mJavaScript as a First-Class Citizen on iOS 7
40mKeynote: Building React Native
14mCreating a React Native like runtime
52mObjective-J Language and Cappuccino Frameworks
45mCycript: JS/ObjC/Java Hybrid REPL
33mReact Native
36mInside React Native's New Architecture: Fabric, TurboModule…
