Skip to content

fix(script-manager): declare jsCallInvoker on RCTBridge for RN 0.89 new arch - #1537

Open
Goldloli wants to merge 1 commit into
callstack:mainfrom
Goldloli:fix/script-manager-rn-089-callinvoker
Open

Goldloli wants to merge 1 commit into
callstack:mainfrom
Goldloli:fix/script-manager-rn-089-callinvoker

Conversation

@Goldloli

@Goldloli Goldloli commented Dec 1, 2026

Copy link
Copy Markdown

Summary

Fixes #1528

React Native 0.89 removed the RCTBridge (RCTTurboModule) category that declared jsCallInvoker in ReactCommon/RCTTurboModule.h. Re.Pack declared that method itself only for the old architecture (inside #ifndef RCT_NEW_ARCH_ENABLED in ScriptManager.mm), so new-architecture builds on RN 0.89 fail with:

ios/ScriptManager.mm:396:75: error: property 'jsCallInvoker' not found on object of type 'RCTBridge *'

This moves the declaration out of the old-architecture-only block and puts it under a Re.Pack-specific category, RCTBridge (JSICallInvoker), mirroring the existing RCTBridge (JSIRuntime) category already used for runtime in the same file:

  • Works across the whole supported range (react-native >= 0.74) with no version checks: on older RN versions the duplicate declaration in our own category is harmless, and it avoids shadowing RN's RCTBridge (RCTTurboModule) category name.
  • The method is still implemented by RN at runtime; this only restores the missing compile-time declaration (the RCTBridgeProxy still provides it).

This is Option A from #1528 — the minimal unblocker. Option B (migrating to RCTCallInvokerModule / RuntimeExecutor before RN removes the proxy methods) stays open as a follow-up.

Changes

  • packages/repack/ios/ScriptManager.mm: declare jsCallInvoker in a new RCTBridge (JSICallInvoker) category, available on both architectures, instead of the old-architecture-only #ifndef block.
  • Changeset added.

Test plan

  • Reproduced the failure with the current main in a minimal React Native 0.89.0-rc.3 app (new architecture on by default) with @callstack/repack installed from a local checkout and autolinked by use_native_modules!. Building the callstack-repack pod target fails with the exact error above:

    ScriptManager.mm:396:75: error: property 'jsCallInvoker' not found on object of type 'RCTBridge *'
    
  • With this change, the same target builds successfully in the same app (only ScriptManager.mm changed, ** BUILD SUCCEEDED **).

  • No changes to Android, JS, or the public API surface.

…ew arch

RN 0.89 removed the RCTBridge (RCTTurboModule) jsCallInvoker declaration
from ReactCommon/RCTTurboModule.h, so new-architecture builds failed with
"property 'jsCallInvoker' not found on object of type 'RCTBridge *'" in
ScriptManager.mm. Re.Pack declared the method only inside
#ifndef RCT_NEW_ARCH_ENABLED; move it into a Re.Pack-specific category
(RCTBridge (JSICallInvoker)) available on both architectures, mirroring
the existing RCTBridge (JSIRuntime) category.

Option A from callstack#1528.
@vercel

vercel Bot commented Dec 1, 2026

Copy link
Copy Markdown

@Goldloli is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Dec 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 92f5cea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@callstack/repack Patch
@callstack/repack-plugin-expo-modules Patch
@callstack/repack-plugin-nativewind Patch
@callstack/repack-plugin-reanimated Patch
@callstack/repack-dev-server Patch
@callstack/repack-init Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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: ScriptManager fails to compile on React Native 0.89 (RCTBridge.jsCallInvoker removed)

1 participant