question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flipper should not get built on iOS release builds

See original GitHub issue

Hello,

As pointed by someone else in a related issue, when adding Flipper to a React-Native project (or I guess any project), building times get significantly increased. This is not desirable.

Impact: longer build times https://github.com/react-native-community/discussions-and-proposals/issues/226

Proposed solution: I’m thinking about adding flag DISABLE_FLIPPER, and wrap all files with #ifndef DISABLE_FLIPPER. I guess that would definitely help, but requires patching dependencies as well. Thoughts?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

42reactions
andreialecucommented, Aug 3, 2020

I’m not sure why this wasn’t proposed yet, but a simple ENV variable can help with this.

  if !ENV['CI']
    use_flipper!
    post_install do |installer|
      flipper_post_install(installer)
    end
  end

On CircleCI the above tweak resulted in dropping build times from about 14 minutes to 8 minutes.

0reactions
TPXPcommented, Aug 3, 2020

I dug some more into this today. It seems we cannot inject custom definitions when working with Cocoapods anyway, since the only one (“Debug”) is hardcoded, and configuration definition does not take into account the target for which the configuration is generated (see https://github.com/CocoaPods/CocoaPods/blob/56538172fac99b410046812df67087a8829a7019/lib/cocoapods/project.rb#L379).

This issue of pods being built even if not used in the configuration has already been raised to Cocoapods: https://github.com/CocoaPods/CocoaPods/issues/9658#issuecomment-605874654 . A few things have been attempted, but nothing landed yet.

I guess we’ll have to implement a few things on Cocoapods before we can make progress on this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native App - Automatic Setup - Flipper
Starting with React Native 0.62, after generating your project with react-native init, the Flipper integration is ready out of the box for debug...
Read more >
App Center build times out for production builds for native iOS
Just went through this for a few weeks. A few articles recommend disabling flipper at build time, that may help you:.
Read more >
Common Issues and Troubleshooting - Appcircle Docs
Disable Flipper SDK on iOS​. Flipper can be a good tool for debugging your applications. It still gets built even if it's not...
Read more >
Developing React Native with Expo and Flipper
EAS lets you use Expo's hardware to build your iOS/Android ... our development build, and not our production builds, we can make sure...
Read more >
Reduce AppCenter iOS build time by 50% | by Radu Iamandi
In order to avoid building Flipper alongside our app, we have to detect when the build is done by AppCenter first. One way...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found