-
Notifications
You must be signed in to change notification settings - Fork 40
[MOB-11828] add-backwards-compatibility #688
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
[MOB-11828] add-backwards-compatibility #688
Conversation
…acy architectures
…ew-arch/MOB-11828-add-backwards-compatibility
…ew-arch/MOB-11828-add-backwards-compatibility
…ew-arch/MOB-11828-add-backwards-compatibility
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.
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_ENABLEDpreprocessor conditionals to separate new and legacy architecture code paths - Adds legacy architecture method exports using
RCT_EXPORT_METHODmacros - 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 |
Copilot
AI
Aug 20, 2025
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.
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.
…ew-arch/MOB-11828-add-backwards-compatibility
evantk91
left a comment
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.
Works as expected. Just run into the error I brought up. But, seems like a separate issue
75dccb3
into
new-arch/MOB-11827-add-new-architecture-support
🔹 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
ENV['RCT_NEW_ARCH_ENABLED'] = '1'toENV['RCT_NEW_ARCH_ENABLED'] = '0'bundle exec pod deintegraterm -rf ~/Library/Developer/Xcode/DerivedData Pods Podfile.lock build ../Gemfile.lockbundle installbundle exec pod installwatchman watch-del-allyarn start --reset-cacheThe app should build and load correctly