flipper: 'FlipperKit/FlipperClient.h' file not found
I’m getting this error while building the app using Expo:
› Compiling react-native-flipper Pods/react-native-flipper » FlipperReactNativeJavaScriptPluginManager.m
❌ (node_modules/react-native-flipper/ios/FlipperReactNativeJavaScriptPluginManager.h:12:9)
10 | #import <React/RCTBridgeModule.h>
11 |
> 12 | #import <FlipperKit/FlipperClient.h>
| ^ 'FlipperKit/FlipperClient.h' file not found
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
› Compiling react-native-flipper Pods/react-native-flipper » FlipperReactNativeJavaScriptPlugin.m
❌ (node_modules/react-native-flipper/ios/FlipperReactNativeJavaScriptPlugin.h:9:9)
7 |
8 | #if defined(DEBUG) || defined(FB_SONARKIT_ENABLED)
> 9 | #import <FlipperKit/FlipperConnection.h>
| ^ 'FlipperKit/FlipperConnection.h' file not found
10 | #import <FlipperKit/FlipperPlugin.h>
11 |
12 | NS_ASSUME_NONNULL_BEGIN
Podfile
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")
require 'json'
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
platform :ios, podfile_properties['ios.deploymentTarget'] || '12.4'
install! 'cocoapods',
:deterministic_uuids => false
abstract_target 'common' do
pod 'Plaid', '~> 3.1.0'
use_expo_modules!
config = use_native_modules!
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => flags[:hermes_enabled] || podfile_properties['expo.jsEngine'] == 'hermes',
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Dir.pwd}/.."
)
# Uncomment to opt-in to using Flipper
# Note that if you have use_frameworks! enabled, Flipper will not work
#
if !ENV['CI']
use_flipper!({ 'Flipper' => '0.174.0' })
end
post_install do |installer|
flipper_post_install(installer)
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
# This is necessary for Xcode 14, because it signs resource bundles by default
# when building for devices.
installer.target_installation_results.pod_target_installation_results
.each do |pod_name, target_installation_result|
target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
resource_bundle_target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
target 'App' do
end
target 'App-dev' do
end
target 'App-preview' do
end
target 'App-staging' do
end
end
I set up Flipper using this expo tutorial.
I followed this and it didn’t worked
Environment
expo: 46.0.16 react: 18.0.0 react-native: 0.69.6 react-native-flipper: 0.174.0 expo-community-flipper: 46.0.2
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 13
- Comments: 18 (1 by maintainers)
update react-native.config.js like this
module.exports = { assets: [‘./assets/fonts’], dependencies: { …(process.env.NO_FLIPPER ? {‘react-native-flipper’: {platforms: {ios: null}}} : {}), }, };
then run “NO_FLIPPER=1 npx pod-install”
Ok so I accidentally removed the line:
"plugins": ["expo-community-flipper"]fromapp.jsonafter adding this line back everything works.
Here is the step in expo docs: https://docs.expo.dev/guides/using-flipper/#step-4-add-the-config-plugin
make sure that plugins key is nested within expo: {}
Did anybody find a solution for this? Also created a stack overflow post.
I don’t use firebase and don’t need to
use_frameworks, still after following the official docs of integrating flipper, it gives me the same error. There is no way I know of to use both firebase v15 and flipper. Anyway, I have no idea what expo does in the background after setting it up (according to docs), but I noticed that there is no FlipperKit installed after runningpod install. What worked for me was modifying the podfile’suse_react_nativepart by adding flipper configuration, so now it looks like this:I also commented out the
use_frameworksline just to be safe, even thought I think it’s not needed if you don’t specify to you static frameworks inapp.jsonI see you have
useFlipper(...)in your podfile, I do not have that, just this. I grabbed this config from my bare RN project. I think that theuseFlipper(...)you have should also work (used to have that in other projects), but it changes so often I really don’t know. IsFlipperKitmentioned in yourpodfile.lock?