Entirely control Flipper being enabled through Podfile (#1086)

Summary:
Currently user’s are being told to add a definition of the `FB_SONARKIT_ENABLED` macro and examples, including those in stock React Native templates, set this for the user by making use of a `post_install` hook in the user’s `Podfile`. This leads to confusion, fragile code [when a user’s project dir structure deviates from vanilla], and is ultimately not necessary as CocoaPods already has dedicated mechanisms to:

* specify build settings (through the `xcconfig` property);
* and selectively include certain pods only in certain build configurations (e.g. debug).

Finally, this PR also includes a commit [to fix the current builds](https://github.com/facebook/flipper/pull/1086/files#r418526812).

## Changelog

> Entirely control Flipper being enabled through inclusion in Podfile and optionally limiting to certain build configurations using the `:configuration` directive.
Pull Request resolved: https://github.com/facebook/flipper/pull/1086

Test Plan: I have built and ran the Sample application, as well as used this version of Flipper with a new RN app built from `master`.

Reviewed By: passy

Differential Revision: D21381828

Pulled By: priteshrnandgaonkar

fbshipit-source-id: edf6dae28eb02336a49e8230654d6186360ea8d6
This commit is contained in:
Eloy Durán
2020-05-05 03:09:54 -07:00
committed by Facebook GitHub Bot
parent 63a512a910
commit c393ee9421
7 changed files with 65 additions and 317 deletions

View File

@@ -334,22 +334,6 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"${PODS_ROOT}/Headers/Public\"",
"\"${PODS_ROOT}/Headers/Public/CocoaAsyncSocket\"",
"\"${PODS_ROOT}/Headers/Public/CocoaLibEvent\"",
"\"${PODS_ROOT}/Headers/Public/ComponentKit\"",
"\"${PODS_ROOT}/Headers/Public/DoubleConversion\"",
"\"${PODS_ROOT}/Headers/Public/Folly\"",
"\"${PODS_ROOT}/Headers/Public/OpenSSL-Static\"",
"\"${PODS_ROOT}/Headers/Public/PeerTalk\"",
"\"${PODS_ROOT}/Headers/Public/RSocket\"",
"\"${PODS_ROOT}/Headers/Public/Flipper\"",
"\"${PODS_ROOT}/Headers/Public/FlipperKit\"",
"\"${PODS_ROOT}/Headers/Public/Yoga\"",
"\"${PODS_ROOT}/Headers/Public/glog\"",
);
INFOPLIST_FILE = SampleSwift/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -371,7 +355,6 @@
"-framework",
"\"Security\"",
);
OTHER_SWIFT_FLAGS = "$(inherited) -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/FlipperKit/FlipperKit.modulemap\" -Xcc -DFB_SONARKIT_ENABLED";
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.flipper.SampleSwift;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
@@ -388,22 +371,6 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"${PODS_ROOT}/Headers/Public\"",
"\"${PODS_ROOT}/Headers/Public/CocoaAsyncSocket\"",
"\"${PODS_ROOT}/Headers/Public/CocoaLibEvent\"",
"\"${PODS_ROOT}/Headers/Public/ComponentKit\"",
"\"${PODS_ROOT}/Headers/Public/DoubleConversion\"",
"\"${PODS_ROOT}/Headers/Public/Folly\"",
"\"${PODS_ROOT}/Headers/Public/OpenSSL-Static\"",
"\"${PODS_ROOT}/Headers/Public/PeerTalk\"",
"\"${PODS_ROOT}/Headers/Public/RSocket\"",
"\"${PODS_ROOT}/Headers/Public/Flipper\"",
"\"${PODS_ROOT}/Headers/Public/FlipperKit\"",
"\"${PODS_ROOT}/Headers/Public/Yoga\"",
"\"${PODS_ROOT}/Headers/Public/glog\"",
);
INFOPLIST_FILE = SampleSwift/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -425,7 +392,6 @@
"-framework",
"\"Security\"",
);
OTHER_SWIFT_FLAGS = "$(inherited) -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/FlipperKit/FlipperKit.modulemap\" -Xcc -DFB_SONARKIT_ENABLED";
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.flipper.SampleSwift;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;