From d2bd5e9c7fc2de754a20e82c864e516babee3b03 Mon Sep 17 00:00:00 2001 From: David <4661784+retyui@users.noreply.github.com> Date: Thu, 5 Jan 2023 11:21:29 +0100 Subject: [PATCH] Exclude `react-native-flipper` when `NO_FLIPPER=1` to prevent iOS build fail --- template/ios/Podfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/template/ios/Podfile b/template/ios/Podfile index 419698b1b3fe9f..47e45ba5c5b705 100644 --- a/template/ios/Podfile +++ b/template/ios/Podfile @@ -4,6 +4,15 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ platform :ios, min_ios_version_supported prepare_react_native_project! +# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. +# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded +# +# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` +# ```js +# module.exports = { +# dependencies: { +# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), +# ``` flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled linkage = ENV['USE_FRAMEWORKS']