This repository has been archived by the owner on Nov 22, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix searching for FlipperClient.h headers in productions builds if PR…
…ODUCTION=1 passed (#4275) Summary: In newer builds of react-native if you passed parameters PRODUCTION=1, flipper pods won't get installed you can see that in their codebase here [react_native_pods.rb](https://github.com/facebook/react-native/blob/6a43fafd78d581f63c664b9af6d10828ac7f77fa/scripts/react_native_pods.rb#L140) so when building ios `react-native-flipper` set `compiler_flags = '-DFB_SONARKIT_ENABLED=1'` in the podspec file which initializeFlipper and lead to the following error: `node_modules/react-native-flipper/ios/FlipperReactNativeJavaScriptPluginManager.h:12:9: 'FlipperKit/FlipperClient.h' file not found` ## Changelog use same condition as react-native to wrap `s.compiler_flags = compiler_flags` and conditionally pass `compiler_flags = '-DFB_SONARKIT_ENABLED=1'` to compiler_flags to avoid build problems Pull Request resolved: #4275 Test Plan: To reproduce - create new react-native app - install react-native-flipper `yarn add react-native-flipper` - run `env PRODUCTION=1 npx pod-install ` - run `yarn ios` Before patch: ```sh node_modules/react-native-flipper/ios/FlipperReactNativeJavaScriptPluginManager.h:12:9: 'FlipperKit/FlipperClient.h' file not found ``` After patch: ```sh ▸ Build Succeeded success Successfully built the app ``` Reviewed By: jknoxville Differential Revision: D41298345 Pulled By: mweststrate fbshipit-source-id: fb46772d46b8105fccb1abb673502bca428eea1d
- Loading branch information