Skip to content

Commit

Permalink
ci(react-native): bump min ios version for test fixtures below RN 0.73
Browse files Browse the repository at this point in the history
  • Loading branch information
yousif-bugsnag committed Jan 14, 2025
1 parent f2864fc commit f2eb704
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions bin/generate-react-native-fixture
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f2eb704

Please sign in to comment.