-
Notifications
You must be signed in to change notification settings - Fork 15
chore: remove old architecture support in Android implementation #547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
|
| * React Native module implementation for Customer.io Logging Native SDK | ||
| * using TurboModules with new architecture. | ||
| */ | ||
| class NativeCustomerIOLoggingModule( |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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
4405bf6 to
a835779
Compare
android/src/main/java/io/customer/reactnative/sdk/NativeCustomerIOModule.kt
Outdated
Show resolved
Hide resolved
This reverts commit 55708cc.
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
build.gradlebuild.gradleassuming New Architecture is enabledIS_NEW_ARCHITECTURE_ENABLEDbuild config flag from SDKbuild.gradlecustomerioNewArchEnabledoverride option as no longer applicablesourceSetsconfig for old/new arch directories as no longer neededCustomerIOReactNativePackageandCustomerIOReactNativePackageImplinto a single file, now directly extendingBaseReactPackagenewarch/tomain/directoryNativeCustomerIOModule+NativeCustomerIOModuleImplNativeCustomerIOLoggingModule+NativeCustomerIOLoggingModuleImplNativeMessagingInAppModule+NativeMessagingInAppModuleImplNativeMessagingPushModule+NativeMessagingPushModuleImplInlineInAppMessageViewManagerprofileAttributes=>setProfileAttributes()deviceAttributes=>setDeviceAttributes()android/src/newarch/android/src/oldarch/*Impl.ktfiles used for dualarch routinggradle.propertiesin example app to remove old arch related propertiesPR Stack:
Note
Simplifies Android RN SDK by removing legacy architecture and unifying on TurboModules/Fabric.
com.facebook.reactplugin; remove new/old arch detection,IS_NEW_ARCHITECTURE_ENABLED,customerioNewArchEnabled, andsourceSetsbranching inandroid/build.gradleandroid/src/newarch/andandroid/src/oldarch/files; merge prior*Implsplit classes into single implementationsNativeCustomerIOModule,NativeCustomerIOLoggingModule,NativeMessagingInAppModule,NativeMessagingPushModule, andInlineInAppMessageViewManagerregistered viaCustomerIOReactNativePackageprofileAttributes→setProfileAttributes,deviceAttributes→setDeviceAttributes; minor API param name alignments (e.g.,deliveryID)PushMessagingExtensions.ktgradle.propertiescleaned up to remove old-arch overridesWritten by Cursor Bugbot for commit b20e274. This will update automatically on new commits. Configure here.