Skip to content

Commit

Permalink
Add comment to explain why production flag is used when Flipper is en…
Browse files Browse the repository at this point in the history
…abled (#33902)

Summary:
Follow up of #33882

## Changelog

[Internal] - Add comment to explain why production flag is used when Flipper is enabled

Pull Request resolved: #33902

Reviewed By: cortinico, f-meloni

Differential Revision: D36632238

Pulled By: cipolleschi

fbshipit-source-id: a859006851d9f50a4ad0ae1141006e8dac7aee6e
  • Loading branch information
f-meloni authored and facebook-github-bot committed May 25, 2022
1 parent 8363184 commit 9f112af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/cocoapods/flipper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ def initialize(flipper_enabled, configurations, versions)
end

def self.enabled(configurations = ["Debug"], versions = {})
return FlipperConfiguration.new(true, configurations, versions)
FlipperConfiguration.new(true, configurations, versions)
end

def self.disabled
return FlipperConfiguration.new(false, [], {})
FlipperConfiguration.new(false, [], {})
end
end
4 changes: 4 additions & 0 deletions scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ def use_react_native! (options={})
pod 'hermes-engine', :path => "#{prefix}/sdks/hermes/hermes-engine.podspec"
end

# CocoaPods `configurations` option ensures that the target is copied only for the specified configurations,
# but those dependencies are still built.
# Flipper doesn't currently compile for release https://github.com/facebook/react-native/issues/33764
# Setting the production flag to true when build for production make sure that we don't install Flipper in the app in the first place.
if flipper_configuration.flipper_enabled && !production
install_flipper_dependencies(prefix)
use_flipper_pods(flipper_configuration.versions, :configurations => flipper_configuration.configurations)
Expand Down

0 comments on commit 9f112af

Please sign in to comment.