A framework for building native applications using React
Support dynamic static linkage with prebuilts (#53432)
Summary: To be able to handle cocoapods USE_FRAMEWORKS with both dynamic/static linkage and precompiled we needed a common way to resolve this. The issue was that when using precompiled and USE_FRAMEWORKS our precompiled framework caused the resulting Pods project to only include header files - hence there where no need to change the header_mappings_dir which a lot of the podspecs did. When using precompiled and building with frameworks (USE_FRAMEWORKS) we need to explicitly add the correct path to ReactCodegen when calling `create_header_search_path_for_frameworks` to ensure libraries can access their codegen files. - Added method that handles this in a generic way - Replaced logic for resolving header mappings and module name using the new method `resolve_use_frameworks` in all podspecs. - Add an explicit check to make sure we add the correct path when using frameworks and the pod is ReactCodegen. - Added includes in the NativeCXXModuleExample.cpp file to test this. ## Changelog: [IOS] [FIXED] - Fixed using USE_FRAMEWORKS (static/dynamic) with precompiled binaries Pull Request resolved: https://github.com/facebook/react-native/pull/53432 Test Plan: Build RN-Tester with USE_FRAMEWORKS static and dynamic ### Tests ran: ✅ Build with source and no USE_FRAMEWORKS ✅ Build with source and USE_FRAMEWORKS = static 🔴 Build with source and USE_FRAMEWORKS = dynamic Undefined symbols for architecture arm64: "facebook::react::oscompat::getCurrentProcessId()", referenced from: Reviewed By: motiz88 Differential Revision: D81127796 Pulled By: cipolleschi fbshipit-source-id: 1f55bf31240ac93cb8b93751b3e37ff6d517f49b
C
Christian Falch committed
e723ca4d6b86d5a98449498395c700513ceba555
Parent: 111187f
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 8/27/2025, 3:12:07 PM