Skip to content

Commit

Permalink
test(react-native): use static frameworks for 0.75 only
Browse files Browse the repository at this point in the history
  • Loading branch information
yousif-bugsnag committed Aug 23, 2024
1 parent 20f325d commit 26fb31e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/generate-react-native-fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -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!')
Expand Down

0 comments on commit 26fb31e

Please sign in to comment.