CocoaPods could not find compatible versions for pod "boost-for-react-native"

Viewed 5126

In my react-native project, I have this dependency of "boost-for-react-native" and installing it like this:

  pod 'boost-for-react-native', :podspec => 'https://raw.githubusercontent.com/react-native-community/boost-for-react-native/master/boost-for-react-native.podspec'

It was working fine lately. I am not sure what changed but I am now unable to install pods. I am getting this error when I run pod install

[!] CocoaPods could not find compatible versions for pod "boost-for-react-native":
  In Podfile:
    Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) was resolved to 2018.10.22.00, which depends on
      boost-for-react-native

    React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) was resolved to 0.61.5, which depends on
      boost-for-react-native (= 1.63.0)

    boost-for-react-native (from `https://raw.githubusercontent.com/react-native-community/boost-for-react-native/master/boost-for-react-native.podspec`)

I have tried removing node_modules, deleting podfile.lock, deintegrate pod. I also tried upgrading the deployment version in podfile and app targets to 11.0. But I still get the above error.

I will really appreciate any help on this. Thanks

4 Answers

This could be because of pod cache.

Try this:

  1. Delete cocoa pods cache: rm -rf ~/Library/Caches/CocoaPods
  2. Delete the Pods folder and the Podfile.lock usually located in <project_root>/ios.
  3. Reinstall pods: pod update

The approach is to download the file and then source it from the local filesystem, rather than making a network call:

Download the tar.bz2 file from https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2

Move the (compressed) file to:

node_modules/react-native/third-party-podspecs

open: node_modules/react-native/third-party-podspecs/boost.podspec

change the :http part of the spec.source key to: :http => 'file:' + dir + '/boost_1_76_0.tar.bz2'

run pod install

note: you may need to adjust the version of the boost package your project specifies.

Related