react-native: CocoaPods could not find compatible versions for pod "React/Core" upgrading to 0.60.0

React Native version: ^0.60.0

Steps To Reproduce

  1. Create a Podfile similar to this:
platform :ios, '10.0'

target 'MyTarget' do
  # inherit! :search_paths
  # Pods for testing

  react_native_path = "../node_modules/react-native"
  pod 'React', :path => "#{react_native_path}", :subspecs => [
    'Core',
    'CxxBridge',
    'DevSupport',
    'RCTText',
    'RCTNetwork',
    'RCTImage',
    'RCTWebSocket',
  ]

  pod "yoga", :path => "#{react_native_path}/ReactCommon/yoga"
  pod 'Folly', :podspec => "#{react_native_path}/third-party-podspecs/Folly.podspec"
end
  1. npm install
  2. cd ios && pod install

In version 0.59 this worked as expected and the pod install did not fail.

Error message from Cocoapods:

[!] CocoaPods could not find compatible versions for pod "React/Core":
  In Podfile:
    React/Core (from `../node_modules/react-native`)

None of your spec sources contain a spec satisfying the dependency: `React/Core (from `../node_modules/react-native`)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 37
  • Comments: 44 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Here is a little workaround I’m using right now, run this bash command in the root directory of the project which replaces React/Core with React-Core in all the npm modules

grep -rl "s.dependency 'React/Core'" node_modules/ | xargs sed -i '' 's=React/Core=React-Core=g'

For those updating from an older react-native version (i.e. 0.62.xx to 0.63.xx), running pod update will fix the issue, pod install does not work.

This is garbage. No wonder people are leaving React Native in droves.

Not only we should change project’s Podfile, but also the third party deps also should update their repos. The .podspec file that contains s.dependency 'React/Core' should change to s.dependency 'React-Core.

I am also facing the same issue.

image

Hey , @tianjyan Thanks it is fixed by this . Not only we should change project’s Podfile, but also the third party deps also should update their repos. The .podspec file that contains s.dependency ‘React/Core’ should change to s.dependency 'React-Core.

where is the .podspec file?

Facing same issue while migrating to 0.60: when we try ‘pod install’, below given error appears:

[!] CocoaPods could not find compatible versions for pod "React/Core":
  In Podfile:
    RNSound (from `../node_modules/react-native-sound`) was resolved to 0.10.12, which depends on
      React/Core

None of your spec sources contain a spec satisfying the dependency: `React/Core`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Please update this line into node_modules/react-native-keepcall/RNCallKeep.podspec

Screenshot 2019-07-11 at 4 12 27 PM

Same issue. react: ^16.8.6 and react-native: 0.60.2 I do not have use_frameworks.

pod 'React', path: rn_path, subspecs: [
    'Core',
    'CxxBridge',
    'DevSupport',
    'RCTActionSheet',
    'RCTAnimation',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket',
]

I am getting this error:

[!] CocoaPods could not find compatible versions for pod "React/RCTVibration":
  In Podfile:
    React/RCTVibration (from `../node_modules/react-native`)

not work !

Screen Shot 2019-07-11 at 2 10 02 PM

For those updating from an older react-native version (i.e. 0.62.xx to 0.63.xx), running pod update will fix the issue, pod install does not work.

Works for me.

I had the same problem after upgrading react (and the podfile). What did it for me was deleting podfile.lock

I have the same problem, Captura de Tela 2019-07-11 às 11 00 43

👋 everyone.

Has we mentioned in the blogpost, the Pods dependency has changed -> https://github.com/facebook/react-native/commit/2321b3f

You need to change your Pod configuration to match the new format.

👋 everyone.

Has we mentioned in the blogpost, the Pods dependency has changed -> 2321b3f

You need to change your Pod configuration to match the new format.

Please also point us to any documentation on how to do that. Please don’t assume that devs in React-Native realm already know iOS nuances 😐

I have the same problem, Captura de Tela 2019-07-11 às 11 00 43

if you are getting this error the you need to in latest version of react-native-image-crop-picker try installing npm i react-native-image-crop-picker@0.25.0 --save and cd ios and
pod install

Hi, I am also stocked on this error. Screenshot 2019-07-10 at 10 07 46 AM

same issue. 😦. How to fix

Actually got the same but with intercom, can’t figured out what’s wrong or just how to fixed it ?

  In Podfile:
    react-native-intercom (from `../node_modules/react-native-intercom`) was resolved to 13.0.0, which depends on React/Core```

Not only we should change project’s Podfile, but also the third party deps also should update their repos. The .podspec file that contains s.dependency 'React/Core' should change to s.dependency 'React-Core.

Some 3rd party modules have already updated their podspecs. What worked for me was upgrading the 3rd party module itself (in package.json). In my case that was rn-fetch-blob.

I just ran this command that it gave me: pod update Folly --no-repo-update and I don’t get the error anymore.

After following the complete thread nothing works 😃. Here is the final solution which works like charm for me.

http://themasterworld.com/cocoapods-could-not-find-compatible-versions-for-pod-react-core-upgrading-to-0-63-x

Try this out, it worked like a charm In Root Directory run this command grep -rl “s.dependency ‘React/Core’” node_modules/ | xargs sed -i ‘’ ‘s=React/Core=React-Core=g’

Source: https://stackoverflow.com/questions/58305191/react-native-fetch-blob-issue-pod-not-installing-for-ios