From 75dcb5fc79fd2a84abfc78f8c6017f07d51945dc Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Thu, 10 Jul 2025 03:04:07 -0700 Subject: [PATCH] fix wrong use of return in header file generation loop (#52490) Summary: Instead of returning when creating the list of header files from our podspecs, we now call `continue`. This is a bug that causes all subsequent globs in the header file list to be omitted after the first omitted glob. bypass-github-export-checks ## Changelog: [IOS] [FIXED] - Fixed premature return in header file generation from podspec globs Pull Request resolved: https://github.com/facebook/react-native/pull/52490 Test Plan: Run prebuild scripts and verify that React-Fabric podspec headers are included in the resulting xcframework. Reviewed By: mdvacca Differential Revision: D78012399 Pulled By: cipolleschi fbshipit-source-id: 2d334f4f7ff966ea4c778786a7056e13a255a708 --- packages/react-native/scripts/ios-prebuild/headers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/ios-prebuild/headers.js b/packages/react-native/scripts/ios-prebuild/headers.js index a3f1bad1c0e..25b03daf1a6 100644 --- a/packages/react-native/scripts/ios-prebuild/headers.js +++ b/packages/react-native/scripts/ios-prebuild/headers.js @@ -49,7 +49,7 @@ function getHeaderFilesFromPodspecs( let arg2 = match[2]?.trim().replace(/['"]/g, ''); if (!arg2) { // Skip - return; + continue; } // Check if arg2 is an array (e.g., ['a', 'b']) if (arg2.startsWith('[') && arg2.endsWith(']')) {