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

Created on 9 Jul 2019  Â·  39Comments  Â·  Source: facebook/react-native

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.
Bug

Most helpful comment

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'

All 39 comments

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

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

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.

not work !

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

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

Screenshot 2019-07-11 at 4 12 27 PM

Hi,

Till now I am not using React-RCTVibration. but with the latest upgrade, it is asking me to install as react has its dependency.

Not only this lib other libs like React-RCTNetwork, React_RCTSettings I was not using, but it is forcing me to install because of latest upgrade, Is there any way we can ignore libs we are not using and use only which is needed.

Please let me know, this will reduce a lot of compile time. Thanks

FYI I am using cocoa pods and my project is a hybrid project

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

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`)

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.

after creating a new project with version 0.60 I see the Podfile changes

`platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'test' do
# Pods for test
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

target 'testTests' do
inherit! :search_paths
# Pods for testing
end

use_native_modules!
end

target 'test-tvOS' do
# Pods for test-tvOS

target 'test-tvOSTests' do
inherit! :search_paths
# Pods for testing
end

end
`

👋 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.

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

same issue. :(. How to fix

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.

it worked, you saved my day.

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

@tianjyan I actually did a file search for the 'React/Core' in my entire project folder (node_modules included). 0 matches. That just does not exist anywhere in my code.

I have the exact same error output the person who started this issue got and this part confuses me:

[!] 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/`)`.

This is my first time editing this part of the code, and I may have interpreted it wrongly. I understood it to mean:
_"CocoaPods looked for and could not find a pod named 'React/Core'. This pod is a dependency that was specified in the package at ../node_modules/react-native/"_.

Can anyone weigh in as to whether I'm correct in thinking this?

I already did a search of file contents for my entire project directory and did not get a hit for any place React-Core may be badly defined as React/Core. Any way to make that output be more helpful in pointing out where I should look?

@sudomann Do you remove node_modules and reinstall the packages after you update your package.json ?

@tianjyan Nope, I didn't do that. I doubt it would change anything if I did that.

See this answer on my stack overflow post. I haven't had time to try out his suggestion yet, but if you're facing the same issue as me, go ahead and see if it solves the issue.

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'

where is the .podspec file?

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

@predbjorn 's suggestion worked for me. Thank you

@Asleepace workaround worked for me.

Nothing worked for regarding this issue. I did run following command

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

But when I ran pod install I got following errors

Installing glog (0.3.5)
[!] /bin/bash -c
set -e

!/bin/bash

Copyright (c) Facebook, Inc. and its affiliates.

#

This source code is licensed under the MIT license found in the

LICENSE file in the root directory of this source tree.

set -e

PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH}"

if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then
# Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg.
# it's better to rely on platform name as fallback because architecture differs between simulator and device

if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
    CURRENT_ARCH="x86_64"
else
    CURRENT_ARCH="armv7"
fi

fi

export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"

Remove automake symlink if it exists

if [ -h "test-driver" ]; then
rm test-driver
fi

./configure --host arm-apple-darwin

Fix build for tvOS

cat << EOF >> src/config.h

/* Add in so we have Apple Target Conditionals */

ifdef __APPLE__

include

include

endif

/* Special configuration for AppleTVOS */

if TARGET_OS_TV

undef HAVE_SYSCALL_H

undef HAVE_SYS_SYSCALL_H

undef OS_MACOSX

endif

/* Special configuration for ucontext */

undef HAVE_UCONTEXT_H

undef PC_FROM_UCONTEXT

if defined(__x86_64__)

define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip

elif defined(__i386__)

define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip

endif

EOF

Prepare exported header include

EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysroot
checking whether the C compiler works... no
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
/Users/arti/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da/missing: Unknown --is-lightweight' option Try/Users/arti/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in /Users/arti/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da': configure: error: C compiler cannot create executables Seeconfig.log' for more details

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 [email protected] --save and cd ios and
pod install

Question: Unable to find a specification for 'React-RCTActionSheet(= 0.61.5)' depend upon by React
did any one happened?

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.

Actually got the same but with intercom, can't figured out what's wrong or just how to fixed it ?
!] CocoaPods could not find compatible versions for pod "React/Core": In Podfile: react-native-intercom (from `../node_modules/react-native-intercom`) was resolved to 13.0.0, which depends on React/Core

With the Podfile template linked above, you get this error:

$ pod install
Analyzing dependencies
[!] No podspec found for `React-Core` in `../node_modules/react-native/React`

Which makes perfect sense, because the only .podspec file in that directory is React-RCTFabric.podspec.

The linked Podfile doesn't work. No other solution in this thread. Why is this ticket closed with no solution to a widespread problem, which should be covered in the official documentation?

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

Yeah, the project seems unmaintained. Tons of critical bugs like this, where no one gives an answer and it somehow gets closed. So many undocumented, but critical steps to making a React-Native module.

As much as I appreciate using JSX instead of Apple's terrible Xcode UI-builder-UI, it's just not worth it when it means I have to use a tool that's arguably even more unmaintained than Apple's.

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

👋 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 :-|

same here
$ npx react-native init App --template react-native-template-typescript


               ######                ######
             ###     ####        ####     ###
            ##          ###    ###          ##
            ##             ####             ##
            ##             ####             ##
            ##           ##    ##           ##
            ##         ###      ###         ##
             ##  ########################  ##
          ######    ###            ###    ######
      ###     ##    ##              ##    ##     ###
   ###         ## ###      ####      ### ##         ###
  ##           ####      ########      ####           ##
 ##             ###     ##########     ###             ##
  ##           ####      ########      ####           ##
   ###         ## ###      ####      ### ##         ###
      ###     ##    ##              ##    ##     ###
          ######    ###            ###    ######
             ##  ########################  ##
            ##         ###      ###         ##
            ##           ##    ##           ##
            ##             ####             ##
            ##             ####             ##
            ##          ###    ###          ##
             ###     ####        ####     ###
               ######                ######


                  Welcome to React Native!
                 Learn once, write anywhere

✔ Downloading template
✔ Copying template
✔ Processing template
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./App/ios && pod install".
CocoaPods documentation: https://cocoapods.org/

How should I proceed?

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.

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

Podfile is wrong. See https://github.com/facebook/react-native/blob/v0.60.0/template/ios/Podfile

No podspec found forReact-Corein../node_modules/react-native/React``

If You getting any error
Follow the process of React Native to upgrade version from this link
https://react-native-community.github.io/upgrade-helper/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anchetaWern picture anchetaWern  Â·  3Comments

aniss picture aniss  Â·  3Comments

oney picture oney  Â·  3Comments

lazywei picture lazywei  Â·  3Comments

TrakBit picture TrakBit  Â·  3Comments