Skip to content

Conversation

@mrehan27
Copy link
Contributor

@mrehan27 mrehan27 commented Dec 23, 2025

closes: Remove Support for React Native Old Architecture

Summary

This PR removes all remaining code and logic related to React Native's old architecture, simplifying the SDK codebase to fully support and rely on New Architecture (TurboModules + Fabric). This aligns with React Native's direction of deprecating old architecture and simplifies maintenance, and future feature work.

Changes

Notes

  • ⚠️ This completely removes support for old architecture to reduce codebase complexity and align the SDK with React Native's roadmap and direction
  • Customers still using old React Native architecture will be affected and must upgrade to new architecture to continue using the SDK
  • Customers already using the new architecture will not be impacted
  • No changes to public JavaScript APIs, this is entirely internal to native module setup

References


Note

Fully removes React Native old-architecture paths and consolidates the SDK on new-architecture modules and Fabric UI components.

  • Unifies Android modules under BaseReactPackage (no old/new split); always apply com.facebook.react; removes new-arch toggles/sourceSets; updates cioSDKVersionAndroid to 4.14.0
  • Rewrites native modules (NativeCustomerIO*, Logging, In-App, Push) to TurboModules-only; replaces legacy impl helpers with direct modules; aligns APIs (setProfileAttributes/setDeviceAttributes) and event emission via codegen EventEmitter
  • iOS wrappers cleaned to TurboModules-only (no RCT_EXTERN/legacy paths); inline in-app view uses Fabric RCTViewComponentView and proper protocol; removes legacy view manager
  • TypeScript specs drop legacy addListener/removeListeners; JS listeners now attach via codegen EventEmitter with try-catch fallbacks (no NativeEventEmitter)
  • Example app upgrades to React Native 0.83 and React 19.2; lockfiles bumped (Hermes, Metro, eslint configs, etc.) and minor iOS script quoting fix

Written by Cursor Bugbot for commit 8bd725c. This will update automatically on new commits. Configure here.

@mrehan27 mrehan27 self-assigned this Dec 23, 2025
@mrehan27 mrehan27 requested a review from a team as a code owner December 23, 2025 13:51
@github-actions
Copy link
Contributor

github-actions bot commented Dec 23, 2025

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


  • Android APN: 553.6.0 (29441758)
  • iOS APN: 553.6.0 (29441758)

@mrehan27 mrehan27 force-pushed the feature/react-native-0-83 branch from 2202936 to 8bd725c Compare December 23, 2025 15:45
emitOnCioLogEvent(data)
}
}
}
Copy link

Choose a reason for hiding this comment

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

Removed armeabi crash protection in logging module

The previous new architecture logging module (src/newarch/.../NativeCustomerIOLoggingModule.kt) included explicit protection to skip TurboModule event emission on armeabi/armeabi-v7a devices with the comment "avoid known native (C++) crashes on unsupported ABIs". This isABIArmeabi check and runOnSupportedAbi wrapper have been removed in the consolidated module. While the code is wrapped in runWithTryCatch, Java try-catch cannot intercept native C++ crashes (SIGSEGV). On affected architectures, logging events could now trigger crashes that were previously avoided. This may be acceptable given React Native 0.83's new architecture focus, but the protection was explicitly added for a reason.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct. At some point we might remove this try-catch too since it doesn't really help with C++ crashes and isn't something we can control. For now, we'll keep the simple try-catch and re-evaluate once this version is rolled out more widely and we see how it behaves.

Copy link
Contributor

@mahmoud-elmorabea mahmoud-elmorabea left a comment

Choose a reason for hiding this comment

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

💯

@mahmoud-elmorabea mahmoud-elmorabea requested a review from a team December 23, 2025 18:40
Copy link
Contributor

@Shahroz16 Shahroz16 left a comment

Choose a reason for hiding this comment

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

should we probably make it a breaking change? as we are removing the support for old arch?

@mrehan27 mrehan27 changed the title feat: remove support for React Native old architecture feat!: remove support for React Native old architecture Dec 24, 2025
@mrehan27 mrehan27 merged commit 4956640 into main Dec 24, 2025
22 checks passed
@mrehan27 mrehan27 deleted the feature/react-native-0-83 branch December 24, 2025 10:47
github-actions bot pushed a commit that referenced this pull request Dec 24, 2025
## [6.0.0](5.3.0...6.0.0) (2025-12-24)

### ⚠ BREAKING CHANGES

* remove support for React Native old architecture (#553)

### Features

* remove support for React Native old architecture ([#553](#553)) ([4956640](4956640))
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.

4 participants