Skip to content

fix(ios): install JSI bindings via RCTTurboModuleWithJSIBindings - #119

Open
jslok wants to merge 1 commit into
lukaszkurantdev:mainfrom
jslok:fix/rn-087-jsi-bindings
Open

jslok wants to merge 1 commit into
lukaszkurantdev:mainfrom
jslok:fix/rn-087-jsi-bindings

Conversation

@jslok

@jslok jslok commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #117

iOS fails to build on React Native 0.87 (Android is unaffected):

  • RCTCxxBridge and RCTBridge.runtime were removed along with the legacy bridge, so install and getTurboModule no longer compile.
  • The iOS CallInvoker.h include used the React-callinvoker/ prefix while the generated spec pulls <ReactCommon/CallInvoker.h>. In 0.87 the React-Core-prebuilt pod vendors its own copy, so those are two different physical files and #pragma once cannot dedupe them, giving redefinition of 'CallInvoker' / 'NativeMethodCallInvoker' / 'SchedulerPriority'.

Fix: take the runtime and call invoker from installJSIBindingsWithRuntime:callInvoker:, which RCTTurboModuleManager invokes while creating the TurboModule, i.e. before JS can call install(). install() now reports whether the bindings actually landed, so the existing check in src/index.tsx keeps its meaning. Both #ifdef ANDROID include branches collapse to <ReactCommon/CallInvoker.h>, which resolves on iOS as well.

Compatibility: no version gating needed. That hook has the same signature and is checked first in 0.85, 0.86 and 0.87, covering the RN 0.85+ range the README supports. Android already took the ReactCommon/ branch, so it is unchanged.

Testing: RN 0.87.1, Xcode 26.6, new architecture, device build succeeds.

RCTCxxBridge and RCTBridge.runtime were removed in React Native 0.87,
so reaching through the bridge for the runtime no longer compiles.
Use the RCTTurboModuleWithJSIBindings hook, which React Native has
provided with this signature since before 0.85.

Also drop the React-callinvoker/ prefix from the iOS CallInvoker
include; both branches now resolve the same header.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS build fails on RN 0.87.0 — RCTCxxBridge/CallInvoker/SchedulerPriority redefinition errors (Android builds fine)

1 participant