From 36d6b24ca8ac47588f4d2ddafbf9d59bef46d4f3 Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Wed, 10 Dec 2025 14:06:58 +0100 Subject: [PATCH 1/3] [ios][precompile] move header template to separate-folder A small cleanup to make the directory structure of the header file template when building xcframeworks. Umbrella and module map templates are now moved into templates folder. --- .../scripts/ios-prebuild/{ => templates}/React-umbrella.h | 2 +- .../{ => templates}/React_RCTAppDelegate-umbrella.h | 0 .../scripts/ios-prebuild/{ => templates}/module.modulemap | 0 packages/react-native/scripts/ios-prebuild/xcframework.js | 8 +++++++- 4 files changed, 8 insertions(+), 2 deletions(-) rename packages/react-native/scripts/ios-prebuild/{ => templates}/React-umbrella.h (99%) rename packages/react-native/scripts/ios-prebuild/{ => templates}/React_RCTAppDelegate-umbrella.h (100%) rename packages/react-native/scripts/ios-prebuild/{ => templates}/module.modulemap (100%) diff --git a/packages/react-native/scripts/ios-prebuild/React-umbrella.h b/packages/react-native/scripts/ios-prebuild/templates/React-umbrella.h similarity index 99% rename from packages/react-native/scripts/ios-prebuild/React-umbrella.h rename to packages/react-native/scripts/ios-prebuild/templates/React-umbrella.h index 45b365b92b9a..b8d6abc5d2ab 100644 --- a/packages/react-native/scripts/ios-prebuild/React-umbrella.h +++ b/packages/react-native/scripts/ios-prebuild/templates/React-umbrella.h @@ -6,7 +6,7 @@ */ #ifdef __OBJC__ -#import +#import "UIKit/UIKit.h" #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) diff --git a/packages/react-native/scripts/ios-prebuild/React_RCTAppDelegate-umbrella.h b/packages/react-native/scripts/ios-prebuild/templates/React_RCTAppDelegate-umbrella.h similarity index 100% rename from packages/react-native/scripts/ios-prebuild/React_RCTAppDelegate-umbrella.h rename to packages/react-native/scripts/ios-prebuild/templates/React_RCTAppDelegate-umbrella.h diff --git a/packages/react-native/scripts/ios-prebuild/module.modulemap b/packages/react-native/scripts/ios-prebuild/templates/module.modulemap similarity index 100% rename from packages/react-native/scripts/ios-prebuild/module.modulemap rename to packages/react-native/scripts/ios-prebuild/templates/module.modulemap diff --git a/packages/react-native/scripts/ios-prebuild/xcframework.js b/packages/react-native/scripts/ios-prebuild/xcframework.js index 236103b1a361..c6285aeb2f2c 100644 --- a/packages/react-native/scripts/ios-prebuild/xcframework.js +++ b/packages/react-native/scripts/ios-prebuild/xcframework.js @@ -31,6 +31,7 @@ const frameworkLog = createLogger('XCFramework'); */ const REACT_CORE_UMBRELLA_HEADER_PATH /*: string*/ = path.join( __dirname, + 'Templates', 'React-umbrella.h', ); @@ -40,10 +41,15 @@ const REACT_CORE_UMBRELLA_HEADER_PATH /*: string*/ = path.join( */ const RCT_APP_DELEGATE_UMBRELLA_HEADER_PATH /*: string*/ = path.join( __dirname, + 'Templates', 'React_RCTAppDelegate-umbrella.h', ); -const RN_MODULEMAP_PATH /*: string*/ = path.join(__dirname, 'module.modulemap'); +const RN_MODULEMAP_PATH /*: string*/ = path.join( + __dirname, + 'Templates', + 'module.modulemap', +); function buildXCFrameworks( rootFolder /*: string */, From bfc365a09904c99975f111a18093c8d2f74a7df1 Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Wed, 10 Dec 2025 17:16:02 +0100 Subject: [PATCH 2/3] codereview: fixed wrong casing on filename --- packages/react-native/scripts/ios-prebuild/xcframework.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native/scripts/ios-prebuild/xcframework.js b/packages/react-native/scripts/ios-prebuild/xcframework.js index c6285aeb2f2c..1ff9f992ca2b 100644 --- a/packages/react-native/scripts/ios-prebuild/xcframework.js +++ b/packages/react-native/scripts/ios-prebuild/xcframework.js @@ -31,7 +31,7 @@ const frameworkLog = createLogger('XCFramework'); */ const REACT_CORE_UMBRELLA_HEADER_PATH /*: string*/ = path.join( __dirname, - 'Templates', + 'templates', 'React-umbrella.h', ); @@ -41,13 +41,13 @@ const REACT_CORE_UMBRELLA_HEADER_PATH /*: string*/ = path.join( */ const RCT_APP_DELEGATE_UMBRELLA_HEADER_PATH /*: string*/ = path.join( __dirname, - 'Templates', + 'templates', 'React_RCTAppDelegate-umbrella.h', ); const RN_MODULEMAP_PATH /*: string*/ = path.join( __dirname, - 'Templates', + 'templates', 'module.modulemap', ); From 0cbbc6e1a4bc67401d7cc5ec76a152e8dffa053e Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Mon, 5 Jan 2026 14:35:21 +0100 Subject: [PATCH 3/3] Reverted quotes around UIKit import --- .../scripts/ios-prebuild/templates/React-umbrella.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/ios-prebuild/templates/React-umbrella.h b/packages/react-native/scripts/ios-prebuild/templates/React-umbrella.h index b8d6abc5d2ab..45b365b92b9a 100644 --- a/packages/react-native/scripts/ios-prebuild/templates/React-umbrella.h +++ b/packages/react-native/scripts/ios-prebuild/templates/React-umbrella.h @@ -6,7 +6,7 @@ */ #ifdef __OBJC__ -#import "UIKit/UIKit.h" +#import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus)