Skip to content

Conversation

@mrehan27
Copy link
Contributor

@mrehan27 mrehan27 commented Dec 1, 2025

part of: MBL-1476

Summary

This PR removes all old React Native architecture (pre TurboModules) support from Android side of React Native SDK, simplifying the codebase by consolidating everything into single implementations that assume the New Architecture (TurboModules + Fabric) compatible setup. This cleanup eliminates dual path complexity and reduces maintenance overhead moving forward.

Changes

  • Removed architecture detection logic from build.gradle
  • Always apply the React Native plugin in build.gradle assuming New Architecture is enabled
  • Removed IS_NEW_ARCHITECTURE_ENABLED build config flag from SDK build.gradle
  • Removed customerioNewArchEnabled override option as no longer applicable
  • Removed sourceSets config for old/new arch directories as no longer needed
  • Merged CustomerIOReactNativePackage and CustomerIOReactNativePackageImpl into a single file, now directly extending BaseReactPackage
  • Moved files from newarch/ to main/ directory
  • Merged and cleaned up these previously split classes:
    • NativeCustomerIOModule + NativeCustomerIOModuleImpl
    • NativeCustomerIOLoggingModule + NativeCustomerIOLoggingModuleImpl
    • NativeMessagingInAppModule + NativeMessagingInAppModuleImpl
    • NativeMessagingPushModule + NativeMessagingPushModuleImpl
    • Inline message view managers merged into a single InlineInAppMessageViewManager
  • Replaced deprecated native SDK APIs:
    • profileAttributes => setProfileAttributes()
    • deviceAttributes => setDeviceAttributes()
  • Deleted all files in:
    • android/src/newarch/
    • android/src/oldarch/
  • Removed all *Impl.kt files used for dualarch routing
  • Cleaned up gradle.properties in example app to remove old arch related properties

PR Stack:


Note

Simplifies Android RN SDK by removing legacy architecture and unifying on TurboModules/Fabric.

  • Always apply com.facebook.react plugin; remove new/old arch detection, IS_NEW_ARCHITECTURE_ENABLED, customerioNewArchEnabled, and sourceSets branching in android/build.gradle
  • Delete all android/src/newarch/ and android/src/oldarch/ files; merge prior *Impl split classes into single implementations
  • New consolidated modules: NativeCustomerIOModule, NativeCustomerIOLoggingModule, NativeMessagingInAppModule, NativeMessagingPushModule, and InlineInAppMessageViewManager registered via CustomerIOReactNativePackage
  • Replace deprecated SDK setters: profileAttributessetProfileAttributes, deviceAttributessetDeviceAttributes; minor API param name alignments (e.g., deliveryID)
  • Push module now directly handles permissions/activity events; shared helpers moved to PushMessagingExtensions.kt
  • Example app gradle.properties cleaned up to remove old-arch overrides

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

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

github-actions bot commented Dec 1, 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.


  • iOS FCM: 547.5.0 (29441296)
  • iOS APN: 547.5.0 (29441296)

* React Native module implementation for Customer.io Logging Native SDK
* using TurboModules with new architecture.
*/
class NativeCustomerIOLoggingModule(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not entirely new file, but just merged version of new arch + common implementation of NativeCustomerIOLoggingModule

* React Native module implementation for Customer.io In-App Messaging Native SDK
* using TurboModules with new architecture.
*/
class NativeMessagingInAppModule(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not entirely new file, but just merged version of new arch + common implementation of NativeMessagingInAppModule

private const val BUILD_VERSION_CODE_TIRAMISU = 33
private const val POST_NOTIFICATIONS_PERMISSION_REQUEST = 24676

class NativeMessagingPushModule(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not entirely new file, but just merged version of new arch + common implementation of NativeMessagingPushModule

* React Native package for Customer.io SDK that registers all TurboModules and ViewManagers.
* Implements new architecture support for React Native.
*/
class CustomerIOReactNativePackage : BaseReactPackage() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not entirely new file, but just merged version of new arch + common implementation of CustomerIOReactNativePackage


private val logger: Logger
get() = SDKComponent.logger
class NativeCustomerIOModule(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not entirely new file, but just merged version of new arch + common implementation of NativeCustomerIOModule

@Shahroz16 Shahroz16 marked this pull request as draft December 4, 2025 19:55
@mrehan27 mrehan27 marked this pull request as ready for review December 16, 2025 10:05
@mahmoud-elmorabea mahmoud-elmorabea requested a review from a team December 22, 2025 09:47
Base automatically changed from mbl-1476-ts-cleanup to feature/react-native-0-83 December 22, 2025 20:23
@mrehan27 mrehan27 force-pushed the mbl-1476-android-cleanup branch from 4405bf6 to a835779 Compare December 22, 2025 20:28
@mrehan27 mrehan27 merged commit 2031664 into feature/react-native-0-83 Dec 23, 2025
16 checks passed
@mrehan27 mrehan27 deleted the mbl-1476-android-cleanup branch December 23, 2025 09:37
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.

3 participants