A framework for building native applications using React
Update ReactCodegen to support Core prebuilds (#52137)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52137 Update ReactCodegen to support Core prebuilds ## Context This PR introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods. - Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks - Added logic in react_native_pods.rb for switching between build from source and using prebuilts - Added rncore.rb - utilities for the ReactCore prebuilts - Updated rndependencies with some extra error handling modelled after rncode.rb - Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js ## Swift: To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting. I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch. ## Changelog: [IOS] [CHANGED] - Update ReactCodegen to support Core prebuilds Pull Request resolved: https://github.com/facebook/react-native/pull/52109 Test Plan: Run with RN Tester. We need to remove all extra pods from RNTester pod file since none of them are yet compatible with prebuilt (they reference non-prebuilt pods) Rollback Plan: Reviewed By: cortinico Differential Revision: D76980283 Pulled By: cipolleschi fbshipit-source-id: 4b120203e9e1628a63580b0b3b2e882837c0b818
C
Christian Falch committed
152cb538f69cd07422526802defe3f3617302098
Parent: 2ec6e3d
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 6/23/2025, 3:13:56 PM