Skip to content

Conversation

@islameldesoky95
Copy link
Collaborator

@islameldesoky95 islameldesoky95 commented Nov 28, 2025

User description

User description

fix react native for iOS new arch bug

PR Type

Bug fix, Enhancement

Description

  • Fix iOS React Native new architecture compatibility by inheriting RCT_NEW_ARCH_ENABLED from parent project instead of hardcoding to 0

  • Refactor podspec C++ configuration with improved header search paths and modular build settings

  • Simplify Android CMakeLists.txt to use ReactAndroid package with version detection and fallback support

  • Update Xcode project configuration with React-runtimeexecutor headers and framework references

Diagram Walkthrough

flowchart LR
  A["iOS Podspec Config"] -->|Inherit RCT_NEW_ARCH_ENABLED| B["Parent Build Settings"]
  A -->|Enhanced Header Paths| C["React Native Frameworks"]
  D["Android CMakeLists"] -->|Use ReactAndroid Package| E["Version Detection"]
  E -->|RN 76+| F["Modern Linking"]
  E -->|Fallback| G["Legacy Linking"]
  H["Xcode Project"] -->|Add Runtime Executor| I["New Arch Support"]
Loading

File Walkthrough

Relevant files
Bug fix
react-native-usercentrics.podspec
Refactor podspec for new architecture compatibility           

react-native-usercentrics.podspec

  • Refactored C++ configuration into modular base_cpp_flags dictionary
    with improved organization
  • Changed GCC_PREPROCESSOR_DEFINITIONS from hardcoded
    RCT_NEW_ARCH_ENABLED=0 to $(inherited) to allow parent project control
  • Expanded header search paths to include React-Fabric, React-Codegen,
    and standard library paths for new architecture support
  • Added new compiler flags:
    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES, DEFINES_MODULE,
    USE_HEADERMAP, ALWAYS_SEARCH_USER_PATHS
  • Updated OTHER_CPLUSPLUSFLAGS to include $(inherited) for both pod and
    user target configurations
+41/-7   
Enhancement
CMakeLists.txt
Simplify CMake configuration with ReactAndroid package     

android/src/main/jni/CMakeLists.txt

  • Added project(rn_usercentrics) declaration and changed library name
    from react_codegen_RNUsercentricsModule to rn_usercentrics
  • Added find_package(ReactAndroid REQUIRED CONFIG) to properly detect
    React Native version
  • Simplified library linking to use ReactAndroid:: namespaced targets
    with version-based conditional logic
  • Replaced complex version-specific compile options with unified
    standard approach using -std=c++20, -fexceptions, -frtti
  • Fixed target reference from ${CMAKE_PROJECT_NAME} to
    ${LIB_TARGET_NAME} in include directories
+26/-35 
Configuration changes
project.pbxproj
Update Xcode project with new framework references             

sample/ios/sample.xcodeproj/project.pbxproj

  • Added new framework references: 918B0A97B42EE4DB5846EED8 for
    Pods_sample.framework and D8194E5BF509496886EB6B66 for
    Pods_sampleTests.framework
  • Removed duplicate and obsolete framework build file reference
    82EB8D8E4ED3004B625C802B
  • Removed sample-Bridging-Header.h from project group structure
  • Removed [CP] Check Pods Manifest.lock shell script build phase
  • Added React-runtimeexecutor framework headers to HEADER_SEARCH_PATHS
    in both Debug and Release configurations
  • Reformatted OTHER_LDFLAGS from string to array format for consistency
+20/-27 
Info.plist
Disable new architecture in sample app                                     

sample/ios/sample/Info.plist

  • Added RCTNewArchEnabled key with boolean value false to explicitly
    disable new architecture in sample app
+2/-0     

CodeAnt-AI Description

Restore React Native iOS new architecture support and stabilize Android builds

What Changed

  • iOS React Native module now respects the app’s new architecture setting instead of forcing it off, restoring compatibility with projects that enable the new architecture (including Expo prebuild)
  • iOS build configuration now includes the necessary React Native and C++ header paths, preventing missing-header build failures
  • Android native library is now linked via the ReactAndroid package for both newer and older React Native versions, reducing version-specific build and linkage errors
  • Android CMake configuration has been simplified with a consistent target name and common compile options, improving reliability across React Native upgrades

Impact

✅ Successful iOS builds with React Native new architecture
✅ Fewer Android build and linkage errors
✅ Smoother React Native upgrades for the SDK integration

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai
Copy link

codeant-ai bot commented Nov 28, 2025

CodeAnt AI is reviewing your PR.

@coderabbitai
Copy link

coderabbitai bot commented Nov 28, 2025

Walkthrough

Build system configuration updates across Android and iOS platforms to support React Native new architecture. Changes include CMake target renaming, dynamic C++ build flags for iOS, updated header search paths, framework linking, and plist configuration.

Changes

Cohort / File(s) Change Summary
Android JNI Build Configuration
android/src/main/jni/CMakeLists.txt
Project renamed to rn_usercentrics, target library renamed from react_codegen_RNUsercentricsModule to rn_usercentrics. Added version-guarded linking logic for ReactAndroid with conditional inclusion of ReactAndroid::fbjni, android, and log libraries.
iOS Pod Build Flags
react-native-usercentrics.podspec
Replaced static pod_target_xcconfig with dynamic base_cpp_flags hash. Added header search paths for React-Core, React-NativeModulesApple, ReactCommon, React-Fabric, and React-Codegen. Introduced C++ build flags (CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES, DEFINES_MODULE, USE_HEADERMAP, ALWAYS_SEARCH_USER_PATHS). Changed to use $(inherited) for OTHER_CPLUSPLUSFLAGS and GCC_PREPROCESSOR_DEFINITIONS.
iOS Sample App Xcode Configuration
sample/ios/sample.xcodeproj/project.pbxproj
Added PBXBuildFile and PBXFileReference entries for Pods_sample.framework and Pods_sampleTests.framework. Updated Frameworks build phase and groups. Added React_runtimeexecutor framework headers to header search paths and build configurations. Converted OTHER_LDFLAGS from single string to multi-value array format. Removed sample-Bridging-Header.h and [CP] Check Pods Manifest.lock build phase.
iOS Sample App Info
sample/ios/sample/Info.plist
Added RCTNewArchEnabled boolean key set to false.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • sample/ios/sample.xcodeproj/project.pbxproj: This file contains numerous detailed changes across multiple build phases, configurations, and framework references that require careful verification to ensure linker flags, header paths, and framework dependencies are correctly configured.
  • react-native-usercentrics.podspec: Dynamic flag generation and conditional header path logic requires validation that all React Native architecture paths resolve correctly across different versions.
  • android/src/main/jni/CMakeLists.txt: Version-guarded linking logic needs verification that fallback paths work for both new and legacy React Native versions.

Possibly related PRs

  • feat: fabric support #167: Modifies Android native build and codegen/TurboModule integration (CMakeLists/jni code and new-arch/fabric support) with direct code-level alignment to this PR's Android changes.

Suggested reviewers

  • uc-brunosilva

Poem

🐰 A rabbit hops through build configs bright,
CMake and pods now aligned just right,
Headers dance, frameworks link with grace,
New arch enabled in every place!
Bridges removed, manifests freed,
The build now blooms as planned indeed! 🌱

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is partially related to the changeset but lacks specificity. It references 'ios react native new arch' and mentions MSDK-3145, but doesn't clearly convey the main changes (CMakeLists.txt restructuring, podspec header path updates, iOS project framework configuration). Consider using a more descriptive title that highlights the primary changes, such as: 'Update build configuration for React Native new architecture support' or 'Fix iOS and Android build configuration for new arch compatibility'.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/MSDK-3145-fix-ios-react-native-new-arch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-code-review
Copy link

qodo-code-review bot commented Nov 28, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@codeant-ai codeant-ai bot added the size:M This PR changes 30-99 lines, ignoring generated files label Nov 28, 2025
@qodo-code-review
Copy link

qodo-code-review bot commented Nov 28, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Add missing fbjni library link

Add the missing ReactAndroid::fbjni library link to the else block in
target_link_libraries. This ensures the JNI-based native module functions
correctly on older React Native versions.

android/src/main/jni/CMakeLists.txt [49-58]

 else()
   # Fallback for older RN versions or when version is not available
   target_link_libraries(
     ${LIB_TARGET_NAME}
     ReactAndroid::reactnative
     ReactAndroid::jsi
+    ReactAndroid::fbjni
     android
     log
   )
 endif()
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a regression where the fbjni library link was omitted for older React Native versions, which would cause build or runtime failures.

High
  • Update

@pantoaibot
Copy link

pantoaibot bot commented Nov 28, 2025

PR Summary:

Short summary:
Make native build and Podspec compatible with React Native's new architecture and Expo prebuild; modernize Android CMake and iOS pod/Xcode settings so the library can build against newer RN versions without forcing RCT_NEW_ARCH_ENABLED.

Key changes:

  • android/CMakeLists.txt

    • Added project() declaration and renamed library target from react_codegen_RNUsercentricsModule to rn_usercentrics.
    • Use find_package(ReactAndroid) and conditionally check ReactAndroid_VERSION_MINOR safely.
    • Simplified linking to ReactAndroid::reactnative, ReactAndroid::jsi, ReactAndroid::fbjni (and Android log libs) instead of many individual internal libs.
    • Standardized compile flags (-std=c++20, RTTI/exceptions, -Wall) and cleaned up include directory usage (private include of CMAKE_CURRENT_SOURCE_DIR).
    • Improved fallback for older RN versions and made linking logic more robust.
  • react-native-usercentrics.podspec

    • Reworked xcconfig handling: introduced base_cpp_flags, merged OTHER_CPLUSPLUSFLAGS with $(inherited), and stopped forcing RCT_NEW_ARCH_ENABLED=0.
    • Added/expanded HEADER_SEARCH_PATHS to include React-Core, ReactCommon, React-Codegen, React-Fabric, and public headers to support new architecture/codegen.
    • Set GCC_PREPROCESSOR_DEFINITIONS to inherit from parent so RCT_NEW_ARCH_ENABLED is controlled by the app (compatible with Expo prebuild).
    • Added flags for non-modular includes, module definitions, and headermap usage to improve C++/module compatibility.
  • sample/ios project files

    • Updated project.pbxproj to add Pod frameworks, remove duplicate build phase, add React-runtimeexecutor header search paths, and convert OTHER_LDFLAGS to an array form.
    • sample Info.plist: added RCTNewArchEnabled = false (sample explicitly disables new arch; pod now inherits the flag from the host app).

Potential impacts / notes:

  • Behavior change: Pod no longer forces RCT_NEW_ARCH_ENABLED=0 — the host app controls new-architecture enablement. Sample app keeps it disabled explicitly.
  • Build target rename (android): target name changed to rn_usercentrics — if external scripts or Gradle files referenced the old name, they will need updating.
  • Linking now relies on ReactAndroid CMake package targets; this assumes the React Native Android CMake package is available in the build environment.
  • These changes aim to improve compatibility with RN’s new architecture and Expo prebuild workflows; no functional runtime logic altered.

Reviewed by Panto AI

@codeant-ai
Copy link

codeant-ai bot commented Nov 28, 2025

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Duplicate Framework Embedding
    Each target's PBXFrameworksBuildPhase now contains two distinct build-file entries for the same Pods frameworks. The sample target links Pods_sample.framework twice and the sampleTests target does the same for Pods_sampleTests.framework, so Xcode will attempt to copy/embed the same framework twice, which often leads to "multiple commands produce" or duplicate symbol errors. We should keep only one entry per framework so the embed/copy phase runs exactly once.

  • Hardcoded Flag
    The PR now forces RCTNewArchEnabled to false in the plist, so the app will stop honoring the RCT_NEW_ARCH_ENABLED setting from the parent build configuration and may break compatibility whenever that build setting differs. The reviewer should confirm that this change matches the intent and doesn't override desired parent project values.

@pantoaibot
Copy link

pantoaibot bot commented Nov 28, 2025

Reviewed up to commit:ff27bce200c7b5d7958a1ef697167aa042888364

Looks good to me! 👍

Additional Suggestion
Others - You renamed the library target from the previous react_codegen_RNUsercentricsModule to rn_usercentrics. Codegen and RN's new-architecture registration (symbols and expected library names) may rely on the previous naming conventions. Confirm nothing else (other build scripts, Java/Kotlin registration, or consumers) expects the old target/name. If codegen or the RN CLI expects the previous name, revert the change or update all consumers accordingly (see original target name in reference lines 1-20). - You changed the linked/native dependency helpers in a way that will likely break CMake configuration or link resolution on many RN setups: (1) You call ReactAndroid::fbjni in the new branch but never find_package(fbjni) (original code linked fbjni::fbjni explicitly). Either call find_package(fbjni REQUIRED CONFIG) and link fbjni::fbjni (or ensure the ReactAndroid package actually exports ReactAndroid::fbjni on all targeted RN versions). (2) You replaced the original explicit list of RN native components used for older RN versions with a short list (ReactAndroid::reactnative / ReactAndroid::jsi). That may hide required symbols when building against RN versions that do not provide those aggregated targets. Revert to linking the explicit components for older RN versions or add feature-detection logic to choose the correct exported targets. See original CMake behavior in reference CMakeLists.txt (reference lines 21-85).
# Find ReactAndroid package first (required for version detection)
find_package(ReactAndroid REQUIRED CONFIG)
# Also find fbjni if not provided by ReactAndroid
if(NOT TARGET ReactAndroid::fbjni)
  find_package(fbjni REQUIRED CONFIG)
endif()

# Link libraries based on React Native version
if(DEFINED ReactAndroid_VERSION_MINOR AND ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
  target_link_libraries(
    ${LIB_TARGET_NAME}
    ReactAndroid::reactnative
    ReactAndroid::jsi
    ReactAndroid::fbjni
    android
    log
  )
else()
  # Fallback for older RN versions or when version is not available
  target_link_libraries(
    ${LIB_TARGET_NAME}
    fbjni
    folly_runtime
    glog
    jsi
    react_codegen_rncore
    react_debug
    react_nativemodule_core
    react_render_core
    react_render_debug
    react_render_graphics
    react_render_mapbuffer
    react_render_componentregistry
    react_utils
    rrc_view
    turbomodulejsijni
    yoga
    android
    log
  )
endif()
  • You removed the conditional call to target_compile_reactnative_options for RN >= 0.80 and replaced it with a manual set of compile options. That helper can inject important platform/RN-specific flags. Prefer to keep the conditional: if target_compile_reactnative_options is available call it; otherwise fall back to your manual flags. This preserves compatibility with RN toolchain changes (see original compile-options logic in reference lines 21-85).
# Compile options based on React Native version
if(COMMAND target_compile_reactnative_options)
  target_compile_reactnative_options(${LIB_TARGET_NAME} PRIVATE)
else()
  target_compile_options(
    ${LIB_TARGET_NAME}
    PRIVATE
    -DLOG_TAG="ReactNative"
    -fexceptions
    -frtti
    -std=c++20
    -Wall
  )
endif()
  • You broadened HEADER_SEARCH_PATHS to include React-Fabric / React-Codegen headers but did not add explicit Pod dependencies for those (if they are required at build time). If your code consumes codegen/fabric headers, add conditional s.dependency entries (React-Codegen / React-Fabric or the correct React subspecs) or document that the host app must provide them. Otherwise builds may fail on consumers that don't have those pods available.
  • You changed GCC_PREPROCESSOR_DEFINITIONS to inherit RCT_NEW_ARCH_ENABLED from the parent project (good for compatibility). Make sure this is the desired behaviour across all consumers — if you need to explicitly opt-out of the new architecture for this Pod, set 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) RCT_NEW_ARCH_ENABLED=0'. If you want the host app to control it, document this and ensure the default host projects set the value.
  • The changes to project.pbxproj include direct edits to generated/managed Xcode project entries (new fileRefs / buildFile entries, and changing OTHER_LDFLAGS from a string to an array). This file is normally generated by CocoaPods / Xcode and committing manual edits can cause merges and build inconsistencies. Prefer to regenerate the project via 'pod install' or the CocoaPods toolchain or keep only intentional changes. Also the new OTHER_LDFLAGS array that contains a single space entry may be unintended — keep 'OTHER_LDFLAGS = "$(inherited)"' to avoid linker flag changes.
  • You added React-runtimeexecutor header search paths which are likely required for the new architecture — that is correct. However, double-check for duplicated or multiple framework/file references introduced in this diff (there appear to be multiple Pods_sample.framework entries). Remove duplicates to avoid Xcode warnings or duplicate linking entries and rely on CocoaPods' generated references where possible.
  • You added 'RCTNewArchEnabled' (camelCase) to Info.plist. This key is not the canonical build-time preprocessor symbol used by the React Native build; the preprocessor flag is typically RCT_NEW_ARCH_ENABLED (ALL CAPS with underscore) and is resolved at build time via xcconfig/GCC_PREPROCESSOR_DEFINITIONS rather than Info.plist. If you intend to disable the new architecture for the sample app, set the preprocessor definition in the Pod/Xcode build settings (GCC_PREPROCESSOR_DEFINITIONS) or use the exact key your tooling expects. Verify that this plist key is actually read by your build/run tooling; otherwise the new arch may still be enabled.

Reviewed by Panto AI

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
android/src/main/jni/CMakeLists.txt (1)

9-17: Duplicate compile options between global and target-specific scopes.

-fexceptions, -frtti, -std=c++20, and -Wall are defined both globally via add_compile_options (lines 9-17) and again via target_compile_options (lines 60-69). This redundancy doesn't break the build but adds unnecessary noise.

Consider consolidating all compile options in one place. Since this is a single-target CMake file, you can remove the global add_compile_options block and keep only target_compile_options:

-# Add compile options
-add_compile_options(
-  -fexceptions
-  -frtti
-  -std=c++20
-  -Wall
-  -Wpedantic
-  -Wno-gnu-zero-variadic-macro-arguments
-  -Wno-dollar-in-identifier-extension
-)
-
 # Find source files
 file(GLOB LIB_CUSTOM_SRCS CONFIGURE_DEPENDS *.cpp)

Then update the target-specific options to include the missing flags:

 target_compile_options(
   ${LIB_TARGET_NAME}
   PRIVATE
   -DLOG_TAG=\"ReactNative\"
   -fexceptions
   -frtti
   -std=c++20
   -Wall
+  -Wpedantic
+  -Wno-gnu-zero-variadic-macro-arguments
+  -Wno-dollar-in-identifier-extension
 )

Also applies to: 60-69

react-native-usercentrics.podspec (1)

42-59: Consider adding trailing commas to multiline arrays.

Per Ruby style conventions, trailing commas in multiline arrays improve diff readability when items are added.

   header_search_paths = [
     '$(PODS_ROOT)/React-Core',
     '$(PODS_ROOT)/React-NativeModulesApple',
     '$(PODS_ROOT)/ReactCommon',
     '$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon',
     '$(PODS_TARGET_SRCROOT)',
     '$(PODS_ROOT)/Headers/Public',
     '$(PODS_ROOT)/Headers/Public/React-Core',
-    '$(PODS_ROOT)/Headers/Public/ReactCommon'
+    '$(PODS_ROOT)/Headers/Public/ReactCommon',
   ]

   # Add new architecture paths if available (will be resolved at build time)
   header_search_paths += [
     '$(PODS_ROOT)/Headers/Public/React-Fabric',
     '$(PODS_ROOT)/Headers/Public/React-Codegen',
     '$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers',
-    '$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers'
+    '$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers',
   ]
sample/ios/sample.xcodeproj/project.pbxproj (1)

523-526: Unusual empty space in OTHER_LDFLAGS.

The OTHER_LDFLAGS array contains " " (a single space) which appears unintentional. This won't break the build but is unnecessary.

 OTHER_LDFLAGS = (
   "$(inherited)",
-  " ",
 );

The same applies to the Release configuration at lines 612-615.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aaf8f80 and ff27bce.

📒 Files selected for processing (4)
  • android/src/main/jni/CMakeLists.txt (2 hunks)
  • react-native-usercentrics.podspec (1 hunks)
  • sample/ios/sample.xcodeproj/project.pbxproj (9 hunks)
  • sample/ios/sample/Info.plist (1 hunks)
🧰 Additional context used
🪛 RuboCop (1.81.7)
react-native-usercentrics.podspec

[convention] 50-50: Put a comma after the last item of a multiline array.

(Style/TrailingCommaInArrayLiteral)


[convention] 58-58: Put a comma after the last item of a multiline array.

(Style/TrailingCommaInArrayLiteral)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test-android
  • GitHub Check: test-ios
🔇 Additional comments (4)
sample/ios/sample/Info.plist (1)

36-37: LGTM - New architecture flag correctly added.

Adding RCTNewArchEnabled set to false in the sample app's Info.plist is a valid approach for controlling the React Native new architecture feature at the app level.

android/src/main/jni/CMakeLists.txt (1)

36-58: Version-based linking approach looks correct.

The conditional linking based on ReactAndroid_VERSION_MINOR properly handles both React Native 0.76+ (with fbjni) and older versions. The DEFINED check guards against missing version info.

react-native-usercentrics.podspec (1)

24-67: Good approach for Expo/React Native new architecture compatibility.

Using $(inherited) for GCC_PREPROCESSOR_DEFINITIONS and OTHER_CPLUSPLUSFLAGS allows the parent project (Expo or React Native CLI) to control the RCT_NEW_ARCH_ENABLED flag, which is the correct pattern for library podspecs.

sample/ios/sample.xcodeproj/project.pbxproj (1)

498-500: React-runtimeexecutor header paths correctly added.

Adding the React-runtimeexecutor framework headers to the search paths is appropriate for React Native new architecture support.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can revert this file

@codeant-ai
Copy link

codeant-ai bot commented Nov 28, 2025

CodeAnt AI finished reviewing your PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can revert this file

@codeant-ai
Copy link

codeant-ai bot commented Dec 2, 2025

CodeAnt AI is running Incremental review

@codeant-ai codeant-ai bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels Dec 2, 2025
@codeant-ai
Copy link

codeant-ai bot commented Dec 2, 2025

CodeAnt AI Incremental review completed.

@islameldesoky95 islameldesoky95 merged commit 4bfd885 into master Dec 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review effort 2/5 size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants