Skip to content

Commit f47b5b8

Browse files
retyuifacebook-github-bot
authored andcommitted
Exclude react-native-flipper when NO_FLIPPER=1 to prevent iOS build fail (#35686)
Summary: - Flipper issue: facebook/flipper#3995 (comment) iOS build fail with an error: ```sh node_modules/react-native-flipper/ios/FlipperReactNativeJavaScriptPlugin.h:9:9: 'FlipperKit/FlipperConnection.h' file not found #import <FlipperKit/FlipperConnection.h> ``` ## Changelog [IOS] [FIXED] - Exclude `react-native-flipper` when `NO_FLIPPER=1` to prevent iOS build fail Pull Request resolved: #35686 Test Plan: ```sh npx react-native init RN0710RC5 --version 0.71.0-rc.5 cd RN0710RC5 yarn add react-native-flipper NO_FLIPPER=1 pod install --project-directory=ios yarn ios # will fail ``` Reviewed By: rshest Differential Revision: D42368444 Pulled By: cipolleschi fbshipit-source-id: a8614ccadb98970ebae15d8743136fa60ead318c
1 parent ac54a5b commit f47b5b8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

template/ios/Podfile

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ
44
platform :ios, min_ios_version_supported
55
prepare_react_native_project!
66

7+
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
8+
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
9+
#
10+
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
11+
# ```js
12+
# module.exports = {
13+
# dependencies: {
14+
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
15+
# ```
716
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
817

918
linkage = ENV['USE_FRAMEWORKS']

0 commit comments

Comments
 (0)