From f2eb70406fcea3d28c4cd35aa2f48909c1f9dfb3 Mon Sep 17 00:00:00 2001 From: Yousif Ahmed Date: Tue, 14 Jan 2025 12:22:11 +0000 Subject: [PATCH] ci(react-native): bump min ios version for test fixtures below RN 0.73 --- bin/generate-react-native-fixture | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/bin/generate-react-native-fixture b/bin/generate-react-native-fixture index dbb0a8732..e24c75a58 100755 --- a/bin/generate-react-native-fixture +++ b/bin/generate-react-native-fixture @@ -213,18 +213,6 @@ function configureRN064Fixture(fixtureDir) { moduleGradle = moduleGradle.replace(currentReactConfig, updatedReactConfig).replace(flipperDependencies, '') fs.writeFileSync(moduleGradlePath, moduleGradle) - // iOS - const podfilePath = resolve(fixtureDir, 'ios/Podfile') - let podfile = fs.readFileSync(podfilePath, 'utf8') - - // disable flipper - podfile = podfile.replace("use_flipper!", "# use_flipper!") - - // bump the minimum iOS version to 11 - podfile = podfile.replace("platform :ios, '10.0'", "platform :ios, '11.0'") - - fs.writeFileSync(podfilePath, podfile) - // set --openssl-legacy-provider node option in pbxproj file const pbxprojPath = resolve(fixtureDir, 'ios/reactnative.xcodeproj/project.pbxproj') let pbxproj = fs.readFileSync(pbxprojPath, 'utf8') @@ -331,6 +319,11 @@ function replaceGeneratedFixtureFiles() { podfileContents = podfileContents.replace(/:flipper_configuration/, '# :flipper_configuration') } + // for RN versions < 0.73, bump the minimum iOS version to 13 (required for Cocoa Performance) + if (parseFloat(reactNativeVersion) < 0.73) { + podfileContents = podfileContents.replace(/platform\s*:ios,\s*(?:'[\d.]+'|min_ios_version_supported)/, "platform :ios, '13.0'") + } + fs.writeFileSync(`${fixtureDir}/ios/Podfile`, podfileContents) // pin xcodeproj version to < 1.26.0