Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'event2/event-config.h' file not found

I am trying to build a react-native app in iOS but unfortunately coming across the following issue (referring to libevent/Flipper):

'event2/event-config.h' file not found

I have react-native v0.63.4 and I have linked the packages using react-native link and also run pod update. I have also deleted my Podfile.lock and run pod install again.

My guess is that it is something to do with the Flipper version? When I comment out use_flipper! in my Podfile and build, it works.

Any ideas on how I can resolve this?

like image 285
UsmanJ Avatar asked Feb 02 '21 23:02

UsmanJ


2 Answers

Facebook released an update yesterday for flipper with v74 and added support for arm64 devices.

so Flipper v74 should have a fix for arm64 devices

Setup:

Using the latest Flipper SDK#

By default React Native might ship with an outdated Flipper SDK. To make sure you are using the latest version, determine the latest released version of Flipper by running npm info flipper.

  • Android:

    Bump the FLIPPER_VERSION variable in android/gradle.properties, for example: FLIPPER_VERSION=0.74.0. Run ./gradlew clean in the android directory.

  • iOS:

    Call use_flipper with a specific version in iOS/Podfile, for example: use_flipper!({ 'Flipper' => '0.74.0' }). Run pod install in the ios directory.

we can see how to setup flipper for react-native here: https://fbflipper.com/docs/getting-started/react-native

This link Solved my issue..Update of pods after changing Flipper Version..refer this

with this version I fixed the 'event2/event-config.h' file not found issue.


Update


Xcode version is now 12.5 and needs a new Flipper version to be installed.

Flipper v95 is now released.

here how to add it:

use_flipper!({ 'Flipper' => '0.95.0' })

wish this will help you.🙏

like image 159
Sohaib Avatar answered Nov 17 '22 13:11

Sohaib


I bumped into the same issue after updating to Xcode 12.4 and updating MacOS. The issue comes from files in flipper-folly.

How to fix it

1. If you don't need flipper

If you are not using flipper in your app, just open your Podfile in your ios app project folder and comment out these lines of codes.

use_flipper!
post_install do |installer|
  flipper_post_install(installer)
end

2. If you need to use flipper in your app.

If you still need to use flipper in your app then specify the flipper-folly version as follows

 use_flipper!({ 'Flipper-Folly' => '2.3.0' }) # update this part
 post_install do |installer|
   flipper_post_install(installer)
 end

NOTE:

You will need to update your pods by running

pod update  

or

 pod install

Also remember to update your cocoapods

sudo gem install cocoapods

Refer to this issue for more information.

like image 25
Hillkim Henry Avatar answered Nov 17 '22 12:11

Hillkim Henry