Skip to content

Conversation

@mrehan27
Copy link
Contributor

@mrehan27 mrehan27 commented Dec 1, 2025

part of: MBL-1477

Summary

This PR removes all old React Native architecture (pre TurboModules) support from iOS 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, reduces maintenance overhead moving forward., and aligns with the Android cleanup done in the previous PR.

Changes

  • Updated native iOS modules for direct TurboModule implementation
  • Removed NativeCustomerIOLoggingImplementation and NativeMessagingInAppImplementation, moving their logic directly into NativeCustomerIOLogging and NativeMessagingInApp
  • Deleted legacy modules: NativeCustomerIOLoggingLegacy, NativeMessagingInAppLegacy
  • Removed all #ifdef RCT_NEW_ARCH_ENABLED checks from *.mm files
  • Updated *.mm files to use only New Architecture / Fabric APIs
  • Deleted RCTInlineMessageNativeViewManager.m (old arch version)
  • Added #ifdef __cplusplus guard in RCTInlineMessageNative.h to prevent C++ import errors in Objective-C only contexts (e.g., CocoaPods umbrella headers)
  • Replaced deprecated native SDK APIs:
    • profileAttributes => setProfileAttributes()
    • deviceAttributes => setDeviceAttributes()
  • Removed old arch specific comments from the example/ios/Podfile

PR Stack:


Note

Consolidates iOS wrappers to New Architecture only (TurboModules + Fabric).

  • Remove all old-arch code paths and #ifdef RCT_NEW_ARCH_ENABLED branches across *.mm; delete RCTInlineMessageNativeViewManager.m
  • Inline previous helper implementations into primary classes; NativeCustomerIOLogging and NativeMessagingInApp now contain their own initialization/event wiring
  • Maintain TurboModule exports and event emission via ObjC emitter; add class factory functions for module registration
  • Add #ifdef __cplusplus guard in RCTInlineMessageNative.h; make RCTInlineMessageNative conform to RCTInlineMessageNativeViewProtocol
  • Update Swift API usage: setProfileAttributes(...) and setDeviceAttributes(...) replace deprecated properties
  • Minor cleanup in example/ios/Podfile comments

Written by Cursor Bugbot for commit df95a43. 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:20
@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 APN: 548.4.0 (29441282)
  • iOS FCM: 548.4.0 (29441282)
  • Android APN: 548.4.0 (29441282)

func setDeviceAttributes(_ attributes: [String: Any]) {
guard ensureInitialized() else { return }
CustomerIO.shared.deviceAttributes = attributes
CustomerIO.shared.setDeviceAttributes(attributes)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@mahmoud-elmorabea mahmoud-elmorabea requested a review from a team December 22, 2025 09:53
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-1477-ios-cleanup branch from cfb7a1d to 04bb189 Compare December 22, 2025 20:39
@mrehan27 mrehan27 merged commit a6a92ad into feature/react-native-0-83 Dec 23, 2025
17 checks passed
@mrehan27 mrehan27 deleted the mbl-1477-ios-cleanup branch December 23, 2025 10:04
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