DEV Community

Cover image for Speed up iOS builds by turning off Flipper on CI (complete React Native guide)

Speed up iOS builds by turning off Flipper on CI (complete React Native guide)

Davyd NRB on December 20, 2022

The simple way to speed up pod install it's turn off Flipper for CI builds. 1) For old React Native versions 0.68.x and lower edit your ios/Podfil...
Collapse
 
swrobel profile image
Stefan Wrobel

Any ideas about Android?

Collapse
 
retyui profile image
Davyd NRB

flipper is disabled by default on Android

Collapse
 
mavericx profile image
Mavericx

nope this is not correct.

Thread Thread
 
retyui profile image
Davyd NRB • Edited
Thread Thread
 
mavericx profile image
Mavericx • Edited

the reference you gave is of v0.72.

v0.73 check
https://react-native-community.github.io/upgrade-helper/?from=0.72.10&to=0.73.2#:~:text=facebook.react%3Aflipper%2D-,integration,-%22)

v0.74 not released yet but agree without it's going to be removed.

Collapse
 
cglacet profile image
Christian glacet

How do you pass the NO_FLIPPER to xcode? And will it be propagated correctly (how)? I'm asking because I still get the FlipperKit/FlipperClient.h not found error after adding these lines in react-native.config.js.

Collapse
 
retyui profile image
Davyd NRB

NO_FLIPPER=1 usually used on CI, locally it's ok to have installed Flipper

Collapse
 
cglacet profile image
Christian glacet • Edited

It really depends, for example we use react native Firebase which prevents using flipper, even locally. I think its worth describing how to edit .xscheme files to set (or not) the env variable to 1.

In our case we simply disabled flipper without using any configuration because we have no solution yet to make it work in any case. So we simply have:

// react-native.config.js
module.exports = {
    dependencies: {
        { 'react-native-flipper': { platforms: { ios: null } } }
    },
};
Enter fullscreen mode Exit fullscreen mode

And

# ios/Podfile
target 'AppName' do
  use_react_native!(
    :flipper_configuration => flipper_config,
  )
end
Enter fullscreen mode Exit fullscreen mode

Also I think many people don't use CI to build iOS apps because its hard (expensive) to get hands on a machine that can run xcodebuild.

Thread Thread
 
retyui profile image
Davyd NRB

got it, maybe it will help stackoverflow.com/a/74254208/7456314?

Thread Thread
 
cglacet profile image
Christian glacet

Maybe, I never tried myself because I ended up removing the option to enable flipper, but I guess it should work.

Collapse
 
raguram90 profile image
RamR

this post helped me. thanks