Skip to content

Fix the native build on React Native 0.88 and AGP 9 - #9

Merged
joker-777 merged 2 commits into
kenhubfrom
fork/rn-0.88-bridgeless-build
Oct 31, 2026
Merged

joker-777 merged 2 commits into
kenhubfrom
fork/rn-0.88-bridgeless-build

Conversation

@joker-777

@joker-777 joker-777 commented Oct 31, 2026 •

Copy link
Copy Markdown

React Native 0.88 removed RCTCxxBridge (and its declaration in RCTBridge+Private.h), so JSIInstaller.h/.mm and WMDatabaseBridge.m no longer compile. AGP 9 (Expo SDK 54+) stops generating BuildConfig for library modules and ships its own Kotlin support, which fails when a module also applies kotlin-android.

iOS

  • installWatermelonJSI takes a plain RCTBridge * and declares the -runtime selector in a category. Both the legacy RCTCxxBridge and the bridgeless RCTBridgeProxy respond to it, so JSI installs on the bridge and in bridgeless mode alike. No behaviour change on React Native < 0.88.

Android

Tested

  • The iOS change is the patch Kenhub has shipped in production builds on Expo SDK 58 / React Native 0.88.1 (new architecture, jsi: false, and the installer path compiles and runs with jsi: true as well).
  • The buildConfig line is what we previously injected from an Expo config plugin for the same builds.
  • yarn ci:check suites for the touched JS areas pass; this PR changes no JavaScript.

Fixes Nozbe#1969, fixes Nozbe#1974 (same root cause), related to Nozbe#1769.

Same change as Nozbe#1978 (commit 220e753), rebuilt on the current kenhub because #1 conflicted in CHANGELOG-Unreleased.md after #6, #7 and #8 landed. Supersedes #1.

iOS: React Native 0.88 removed RCTCxxBridge and its declaration in
RCTBridge+Private.h, so JSIInstaller and WMDatabaseBridge no longer
compiled. The installer now takes a plain RCTBridge and declares the
-runtime selector itself; both the legacy RCTCxxBridge and the
bridgeless RCTBridgeProxy respond to it, so JSI installs on either.

Android: AGP 9 stops generating BuildConfig for library modules, but
the Java sources read BuildConfig.DEBUG, so the module enables
buildFeatures.buildConfig explicitly. The module has had no Kotlin
sources since the Java rewrite, and applying kotlin-android collides
with AGP 9's built-in Kotlin extension, so the plugin, its classpath
and the stdlib dependency go.

Fixes Nozbe#1969, fixes Nozbe#1974 (same root cause), related to Nozbe#1769.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 31, 2026 19:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the React Native 0.88 and Android Gradle Plugin 9 compatibility updates.

No open issues 🎉

What changed in this PR

Updates WatermelonDB’s native integration for React Native 0.88 and Android Gradle Plugin 9, addressing iOS bridge compilation and Android build configuration compatibility.

Changes:

  • Uses RCTBridge and an explicit runtime selector declaration instead of the removed RCTCxxBridge type.
  • Enables Android BuildConfig generation and removes unused Kotlin plugin configuration and dependencies.
  • Documents both compatibility fixes in the unreleased changelog.
File Description
native/​ios/​WatermelonDB/​objc/​WMDatabaseBridge.m Passes RCTBridge directly to the JSI installer.
native/​ios/​WatermelonDB/​JSIInstaller.mm Updates the installer type and declares the runtime selector.
native/​ios/​WatermelonDB/​JSIInstaller.h Uses the public bridge header and updates the installer signature.
native/​android/​gradle.properties Removes the unused Kotlin version property.
native/​android/​build.gradle Enables BuildConfig and removes Kotlin plugin and dependency setup.
CHANGELOG-Unreleased.md Records the iOS and Android compatibility fixes.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 31, 2026 19:05
@joker-777
joker-777 merged commit d5ddf55 into kenhub Oct 31, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the iOS bridge and Android build compatibility updates.

No open issues 🎉

Review effort: Balanced

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.

2 participants