score:45

Accepted answer

it's because of use_flipper in podfile for ios project.

use_flipper!

so, i was needed to indicate flipper-folly version with use_flipper as

use_flipper!({ 'flipper-folly' => '2.3.0' })

it worked perfectly after that change.

score:-2

how to fix:

this is caused by flipper-folly being broken on the latest catalina build.
until this gets patched, your best bet is to force your cocoapods to the latest working version (2.3.0).

  1. go to your project folder root and open the /ios directory.

    cd ios
    
  2. open your podfile and change the following block of code:

    use_flipper!
    

    to

    use_flipper!({ 'flipper-folly' => '2.3.0' })
    
  3. inside the /ios directory run the following command:

    pod install
    
  4. if it worked, go back to your project root and try to run the project

    cd ..
    npx react-native run-ios
    

    in case it didn't, check the compatibility trouble-shooting section:

compatibility trouble-shooting

after trying to run pod install you may have gotten a similar error to this:

[!] cocoapods could not find compatible versions for pod "flipper-folly":
  in podfile:
    flipper-folly (= 2.3.0)

    flipper-rsocket (~> 1.1) was resolved to 1.3.0, which depends on
      flipper-folly (~> 2.5)

    flipperkit/fbcxxfollydynamicconvert (~> 0.54.0) was resolved to 0.54.0,
      which depends on
      flipper-folly (~> 2.2)

in order to solve this

  1. go back to your /ios folder

    cd ios
    
  2. and remove the podfile.lock file

    rm -rf podfile.lock
    
  3. install the pods again

    pod install
    
  4. and run react-native

    cd ..
    npx react-native run-ios
    

score:0

for me disabling flipper from podfile works!!

updated podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'reactnativeapp' do
  config = use_native_modules!

  use_react_native!(:path => config["reactnativepath"])

  target 'reactnativeapptests' do
    inherit! :complete
    # pods for testing
  end

  # enables flipper.
  #
  # note that if you have use_frameworks! enabled, flipper will not work and
  # you should disable these next few lines.
  # use_flipper!({ 'flipper-folly' => '2.3.0' })
  # post_install do |installer|
    # flipper_post_install(installer)
  # end
end

target 'reactnativeapp-tvos' do
  # pods for reactnativeapp-tvos

  target 'reactnativeapp-tvostests' do
    inherit! :search_paths
    # pods for testing
  end
end
  • cd ios && pod install
  • cd .. && npx react-native run-ios

score:0

i tried everything here and a lot more and nothing worked!

i then:

  • deleted my node_modules (the only thing i hadn't done yet),
  • deleted pods folder and podfile.lock,
  • then npm install (with --legacy-peer-deps for me),
  • npx pod-install (or cd ios/, pod-install)
  • npx react-native run-ios

and it finally worked.

apparently deleting the node_modules did the trick, but do not ask me why.

score:0

you can easily comment out these lines to disable flipper :

  # add_flipper_pods!
  # post_install do |installer|
  #   flipper_post_install(installer)
  # end

and comment out this lines in appdelegate.m :

//#if debug
//#import <flipperkit/flipperclient.h>
//#import <flipperkitlayoutplugin/flipperkitlayoutplugin.h>
//#import <flipperkituserdefaultsplugin/fkuserdefaultsplugin.h>
//#import <flipperkitnetworkplugin/flipperkitnetworkplugin.h>
//#import <skiosnetworkplugin/skiosnetworkadapter.h>
//#import <flipperkitreactplugin/flipperkitreactplugin.h>

//static void initializeflipper(uiapplication *application) {
//  flipperclient *client = [flipperclient sharedclient];
//  skdescriptormapper *layoutdescriptormapper = [[skdescriptormapper alloc] initwithdefaults];
//  [client addplugin:[[flipperkitlayoutplugin alloc] initwithrootnode:application withdescriptormapper:layoutdescriptormapper]];
//  [client addplugin:[[fkuserdefaultsplugin alloc] initwithsuitename:nil]];
//  [client addplugin:[flipperkitreactplugin new]];
//  [client addplugin:[[flipperkitnetworkplugin alloc] initwithnetworkadapter:[skiosnetworkadapter new]]];
//  [client start];
//}
//#endif

also this in the same file:

//  #if debug
//  initializeflipper(application);
//  #endif

score:0

use_flipper!({ 'flipper' => '0.145.0' })

use this in pod file. worked for me...

delete the podfile.lock then run,

pod install
pod update

score:1

from mmemories, it's necessary to execute pod install command before !

score:2

react version -0. 63 i am still facing the same issue while starting a new project for ios in mac. i have followed these steps given below but still the issue

npx react-native init xxxx
cd xxxx
npx react-native run-ios
pod install

after doin this i got the following error

** build failed **

the following build commands failed:
        compilec /users/apple/library/developer/xcode/deriveddata/profirst-bbfobfkgbfqalecezvbonnkwcffv/build/intermediates.noindex/pods.build/debug-iphonesimulator/flipper.build/objects-normal/x86_64/flipperrsocketresponder.o /users/apple/profirst/ios/pods/flipper/xplat/flipper/flipperrsocketresponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

later i have changed in the pod file use_flipper! to use_flipper!({ 'flipper-folly' => '2.3.0' }), but i'm still having the same issue.

here is a screenshot of the problem

score:2

  1. replace in ios/podfile – use_flipper! to use_flipper!({ 'flipper-folly' => '2.3.0' })
  2. exclude ios/podfile.lock
  3. pod install

score:2

if nothing works, comment it.

# use_flipper!({ 'flipper-folly' => '2.5.1' })

score:2

the only fix worked for me

there is no need to disable flipper or juggle with its versions

add this to your podfile in post_install section

system('cd pods/headers/public; ln -s protobuf protobuf')
system('cd pods/openssl-universal/frameworks/openssl.xcframework/ios-arm64_arm64e_armv7_armv7s; ln -sfh openssl.framework openssl.framework')
system('cd pods/openssl-universal/frameworks/openssl.xcframework/ios-arm64_i386_x86_64-simulator; ln -sfh openssl.framework openssl.framework')
system('cd pods/openssl-universal/frameworks/openssl.xcframework/ios-arm64_x86_64-maccatalyst; ln -sfh openssl.framework openssl.framework')
system('cd pods/openssl-universal/frameworks/openssl.xcframework/macos-arm64_arm64e_x86_64; ln -sfh openssl.framework openssl.framework') 

it will look like this

  ...

  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)

    # check if file system is case sensitive 
    # if so then create symbolic links
    # for every openssl framework with name in lowercase
    unless file.exist? "pods"
      system('cd pods/headers/public; ln -s protobuf protobuf')
      system('cd pods/openssl-universal/frameworks/openssl.xcframework/ios-arm64_arm64e_armv7_armv7s; ln -sfh openssl.framework openssl.framework')
      system('cd pods/openssl-universal/frameworks/openssl.xcframework/ios-arm64_i386_x86_64-simulator; ln -sfh openssl.framework openssl.framework')
      system('cd pods/openssl-universal/frameworks/openssl.xcframework/ios-arm64_x86_64-maccatalyst; ln -sfh openssl.framework openssl.framework')
      system('cd pods/openssl-universal/frameworks/openssl.xcframework/macos-arm64_arm64e_x86_64; ln -sfh openssl.framework openssl.framework') 
    end

    __apply_xcode_12_5_m1_post_install_workaround(installer)
  end

  ...

then

  • remove pods folder and podfile.lock

  • run pod install

  • build your app (npx react-native run-ios in the root folder of your app)

explanation

in my case the issue was the case sensitive file system. you can search in terminal for fatal error: 'openssl/opensslv.h' file not found or just try to build using this fix.

score:4

yes, everest climber is right. it's broken after i updated my react-native-cli. it's because of the use_flipper new version.

steps to fix it:

> open podfile for the ios project.
> replace `use_flipper!` with `use_flipper!({ 'flipper-folly' => '2.3.0' })`.
> then you must remove both pods directory and podfile.lock.
> open terminal and go to ios project directory.
> do `pod install`.

it's worked for me perfectly.

score:5

this seems to be an issue in react-native 0.63, try initiating the project with --version 0.62 and it should work until they fix the bug

score:5

this issue is caused by flipper-folly pod spec updates

remove/uninstall react-native-cli, just use npx

try this on react-native 0.63.4 (previous stable version).

remember it doesn't work for latest 0.64.0 with xcode 12.5

inside ios/podfile replace use_flipper! with:

use_flipper!({ 'flipper-folly' => '2.5.3', 'flipper' => '0.87.0','flipper-rsocket' => '1.3.1' })

pod install --repo-update

npx react-native run-ios

if you don't need to use flipper or still getting some issues try commenting out flipper inside podfile and install pods using command

pod install --repo-update

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

score:16

i could solve this issue after disabling flipper in ios/podfile.

  1. fix podfile as shown in below image

enter image description here

  1. cd ios
  2. delete pods folder and podfile.lock
  3. pod install
  4. pod update
  5. cd .. && npx react-native run-ios

score:24

following everest climber answer

  1. in podfile under ios/ folder

    change use_flipper! to use_flipper!({ 'flipper-folly' => '2.3.0' })

  2. cd ios
  3. pod install
  4. pod update
  5. cd .. && npx react-native run-ios (to run the application)

this worked for me. hopefully, it works for you too


Related Query

More Query from same tag