Skip to content

Conversation

@lposen
Copy link
Contributor

@lposen lposen commented Aug 2, 2025

🔹 JIRA Ticket(s) if any

✏️ Description

Update our codebase to support legacy ios architecture in iOS.

Testing

Building the iOS version of this app in legacy arch should work

  • open example>ios>podfile
    • change ENV['RCT_NEW_ARCH_ENABLED'] = '1' to ENV['RCT_NEW_ARCH_ENABLED'] = '0'
  • in example>ios, run the following:
    • bundle exec pod deintegrate
    • rm -rf ~/Library/Developer/Xcode/DerivedData Pods Podfile.lock build ../Gemfile.lock
    • bundle install
    • bundle exec pod install
  • in example run:
    • watchman watch-del-all
    • yarn start --reset-cache
  • build the ios app

The app should build and load correctly

@github-actions
Copy link

github-actions bot commented Aug 6, 2025

Lines Statements Branches Functions
Coverage: 38%
37.98% (177/466) 13.04% (24/184) 32.9% (51/155)

…ew-arch/MOB-11828-add-backwards-compatibility
@lposen lposen requested review from Copilot and evantk91 and removed request for Copilot August 20, 2025 22:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds backwards compatibility to support the legacy iOS architecture in React Native. The changes enable the module to work with both the new Fabric architecture and the legacy architecture by using conditional compilation directives.

  • Uses RCT_NEW_ARCH_ENABLED preprocessor conditionals to separate new and legacy architecture code paths
  • Adds legacy architecture method exports using RCT_EXPORT_METHOD macros
  • Updates the header to conditionally import different React Native modules and implement different protocols

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ios/RNIterableAPI/RNIterableAPI.h Conditionally imports different React Native modules and implements either NativeRNIterableAPISpec or RCTBridgeModule protocol based on architecture
ios/RNIterableAPI/RNIterableAPI.mm Adds conditional compilation to separate new architecture functions from legacy RCT_EXPORT_METHOD implementations for backwards compatibility

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}

// MARK: - RNIterableAPI functions exposed to JS
- (void)initializeWithApiKey:(NSString *)apiKey
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

The comment '// MARK: - RNIterableAPI functions exposed to JS' should be moved inside the #if RCT_NEW_ARCH_ENABLED block since these functions are specific to the new architecture.

Copilot uses AI. Check for mistakes.
…ew-arch/MOB-11828-add-backwards-compatibility
Copy link
Contributor

@evantk91 evantk91 left a comment

Choose a reason for hiding this comment

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

Works as expected. Just run into the error I brought up. But, seems like a separate issue

@lposen lposen merged commit 75dccb3 into new-arch/MOB-11827-add-new-architecture-support Aug 21, 2025
5 checks passed
@lposen lposen deleted the new-arch/MOB-11828-add-backwards-compatibility branch August 21, 2025 21:34
@lposen lposen mentioned this pull request Oct 14, 2025
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