diff --git a/scripts/generate-react-native-fixture.js b/scripts/generate-react-native-fixture.js index a752b449d..3e1b7c9cc 100644 --- a/scripts/generate-react-native-fixture.js +++ b/scripts/generate-react-native-fixture.js @@ -77,10 +77,14 @@ if (!process.env.SKIP_GENERATE_FIXTURE) { fs.writeFileSync(`${fixtureDir}/ios/reactnative.xcodeproj/project.pbxproj`, pbxProjContents) - // use static frameworks (this is required to use bugsnag-cocoa from the scenarios package) + // update Podfile let podfileContents = fs.readFileSync(`${fixtureDir}/ios/Podfile`, 'utf8') - podfileContents = podfileContents.replace(/target 'reactnative' do/, 'use_frameworks! :linkage => :static\ntarget \'reactnative\' do') - + + // use static frameworks (this fixes an issue with react-native-file-access on 0.75) + if (parseFloat(rnVersion) >= 0.75) { + podfileContents = podfileContents.replace(/target 'reactnative' do/, 'use_frameworks! :linkage => :static\ntarget \'reactnative\' do') + } + // disable Flipper if (podfileContents.includes('use_flipper!')) { podfileContents = podfileContents.replace(/use_flipper!/, '# use_flipper!')