'CocoaPods could not find compatible versions for pod "Flipper-Folly"

I have been trying to run ios for a new but kept getting this error

** BUILD FAILED **


The following build commands failed:
        CompileC /Users/struggle/Library/Developer/Xcode/DerivedData/client-grabnjjdhfcfyugfdqcwdvbebnva/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/struggle/Desktop/Tax/client/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

I saw a solution that said to add use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in my podfile now when i run pod install i get the following error

`[!] CocoaPods could not find compatible versions for pod "Flipper-Folly":

In Podfile:
Flipper-Folly (= 2.3.0)

FlipperKit (~> 0.54.0) was resolved to 0.54.0, which depends on
  FlipperKit/Core (= 0.54.0) was resolved to 0.54.0, which depends on
    Flipper (~> 0.54.0) was resolved to 0.54.0, which depends on
      Flipper-Folly (~> 2.2)

FlipperKit (~> 0.54.0) was resolved to 0.54.0, which depends on
  FlipperKit/Core (= 0.54.0) was resolved to 0.54.0, which depends on
    Flipper (~> 0.54.0) was resolved to 0.54.0, which depends on
      Flipper-RSocket (~> 1.1) was resolved to 1.3.0, which depends on
        Flipper-Folly (~> 2.5)`

Using ({'Flipper-Folly' => '2.3.0'}) results in me getting the inital error again. Please help me fix this issue. Thank You



Solution 1:[1]

In my case, I had just had to update the repo.

pod install --repo-update

the above command worked for me.

Solution 2:[2]

Delete Podfile.lock and run pod install. It will start working.Also update your cocoapods by running sudo gem install cocoapods

Solution 3:[3]

as of today April 11, 2021 use_flipper!({ 'Flipper-Folly' => '2.3.0' }) no longer works. Instead you use, use_flipper!({ 'Flipper-Folly' => '2.5' }) if this won't work in the future either. Look into the error it will tell you which version to use.

Solution 4:[4]

  1. Delete Podfile.lock

  2. Add to your Podfile

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

    flipper_post_install(installer)

    end

  3. run pod install.

if your Podfile contains below code or something like this and its working successfully for one of your project but not working for others, which means

Your podfile.lock may contains above definition or working flavour of folly.

  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
    installer.pods_project.build_configurations.each do |config|
      config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
      config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
    end
  end

Solution 5:[5]

Remove the version with flipper so that it installs the latest available one on pod install.

So in pod file:

Change:

use_flipper!({ 'Flipper-Folly' => '2.3.0' })

to:

use_flipper!

Solution 6:[6]

For Mac M1 mates.

I just updates the repo.

arch -x86_64 pod install --repo-update

its worked

Solution 7:[7]

For xcode 13 and react-native 0.66 (since the question is tagged with react-native), the only solution that worked for me is:

 react-native start --reset-cache
 rm -rf node_modules/
 rm -rf package-lock.json 
 cd ios && pod deintegrate
 cd .. && rm -rf ios/Podfile.lock 
 npm install
 npm audit fix
 react-native link
 cd ios && pod install
 cd .. && react-native run-ios

Source: https://github.com/facebook/react-native/issues/28408

Solution 8:[8]

I needed to go down one version before it, since the last one was 3 hours ago and obviously still not available in any repo.

Check this: https://github.com/facebook/flipper/releases And this: https://fbflipper.com/docs/getting-started/react-native/

Solution 9:[9]

Update 2022, May 27th:

npx pod-install --repo-update

Solution 10:[10]

For fast fix

Do update pod file :-

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