Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CocoaPods could not find compatible versions for pod "React/Core" upgrading to 0.60.0 #25553

Closed
nporter-adbe opened this issue Jul 8, 2019 · 44 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@nporter-adbe
Copy link

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.
@nporter-adbe nporter-adbe changed the title CocoaPods could not find compatible versions for pod "React/Core" CocoaPods could not find compatible versions for pod "React/Core" upgrading to 0.60.0 Jul 8, 2019
@danilobuerger
Copy link
Contributor

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

@tianjyan
Copy link

tianjyan commented Jul 9, 2019

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.

@uc-apa
Copy link

uc-apa commented Jul 9, 2019

I am also facing the same issue.

image

@jaswantjatav
Copy link

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

@jaswantjatav
Copy link

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.

@AliEbrahimpour
Copy link

not work !

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

@jaswantjatav
Copy link

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

Screenshot 2019-07-11 at 4 12 27 PM

@vivekhumnabad
Copy link

vivekhumnabad commented Jul 11, 2019

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

@vauruk
Copy link

vauruk commented Jul 11, 2019

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

@woodpav
Copy link

woodpav commented Jul 12, 2019

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

@PavanKumar-sa
Copy link

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.

@steven-taglohner
Copy link

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
`

@kelset
Copy link
Contributor

kelset commented Jul 12, 2019

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

@kelset kelset closed this as completed Jul 12, 2019
@hieuuet
Copy link

hieuuet commented Jul 17, 2019

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

same issue. :(. How to fix

@shabeer3508
Copy link

shabeer3508 commented Jul 20, 2019

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.

@ollyde
Copy link

ollyde commented Jul 25, 2019

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

@sudomann
Copy link

sudomann commented Jul 25, 2019

@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?

@tianjyan
Copy link

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

@sudomann
Copy link

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

@asleepace
Copy link

asleepace commented Jul 31, 2019

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'

@kirhim
Copy link

kirhim commented Aug 2, 2019

where is the .podspec file?

@greentornado
Copy link

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

this solved

@predbjorn
Copy link

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

@shibathethinker
Copy link

@predbjorn 's suggestion worked for me. Thank you

@bethwelt
Copy link

@asleepace workaround worked for me.

@jiffy-arti
Copy link

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 <TargetConditionals.h>
#include <Availability.h>
#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 See config.log' for more details

@basha777
Copy link

basha777 commented Sep 4, 2019

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

@landscape-fire
Copy link

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

@bogdanbolchis
Copy link

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.

@MayoudP
Copy link

MayoudP commented Mar 2, 2020

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

@Pointotech
Copy link

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?

@Pointotech
Copy link

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.

@AhmadSadiq0
Copy link

AhmadSadiq0 commented Jun 2, 2020

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

@Aman-Aalam
Copy link

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

@costerik
Copy link

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?

@NickMandylas
Copy link

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.

@usama-homage
Copy link

usama-homage commented Sep 15, 2020

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

@ahsanmster
Copy link

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

saintego added a commit to salsita/rn-fetch-blob that referenced this issue Dec 2, 2020
@TRIPTI-JAIN
Copy link

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/

@95Rawan
Copy link

95Rawan commented Dec 12, 2020

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

@kevinjoel
Copy link

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

thanks this work for me!

@eufernandodias
Copy link

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.

@tundsD53
Copy link

tundsD53 commented Feb 2, 2021

I'm trying to get this working with Xcode 12.4, and i'm coming across the same issue also with cocoapods.

This is our current package.json

{
  "name": "xxxxxx",
  "version": "1.8",
  "private": true,
  "scripts": {
    "start": "yarn react-native start"
  },
  "dependencies": {
    "react": "16.13.1",
    "react-native": "^0.63.4"
  }
}

Here is out current PodFile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

def react_components
  # Your 'node_modules' directory is probably in the root of your project,
  # but if not, adjust the `:path` accordingly
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket' # needed for debugging
    # Add any other subspecs you want to use in your project
  ]
  # Explicitly include Yoga if you are using RN >= 0.42.0
  pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"

  # Third party deps podspec link
  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'
end

def project_pods

  pod 'Moya'
  pod 'Firebase/Analytics'
  pod 'Firebase/Messaging'
  pod 'Firebase/Crashlytics'
  pod 'Firebase/RemoteConfig'
  pod 'SwiftKeychainWrapper'
end

def internal_pods

end

target 'xxxx UAT' do
  inherit! :search_paths
  project_pods
  internal_pods
  react_components
end

target 'xxxx Release' do
  inherit! :search_paths
  project_pods
  internal_pods
  react_components
end

target 'xxxx Dev' do
  inherit! :search_paths
  project_pods
  internal_pods
  react_components
end

Whenever I run pod install or pod update in the terminal. I seem to be getting the following error.

pod install --repo-update
Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1
Ignoring bigdecimal-2.0.0 because its extensions are not built. Try: gem pristine bigdecimal --version 2.0.0
Ignoring redcarpet-3.5.0 because its extensions are not built. Try: gem pristine redcarpet --version 3.5.0
Ignoring sassc-2.4.0 because its extensions are not built. Try: gem pristine sassc --version 2.4.0
Updating local specs repositories
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "React/RCTNetwork":
  In Podfile:
    React/RCTNetwork (from `../node_modules/react-native`)

None of your spec sources contain a spec satisfying the dependency: `React/RCTNetwork (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.

I've gone into the node modules folder, and I can't see anything referring to this podspec, so when I install the node modules this podspec is missing. I've tried the following so far.

  • Follow the docs closely on https://reactnative.dev/docs/integration-with-existing-apps
  • Execute the following command to remove any references of the old framework grep -rl "s.dependency 'React/Core'" node_modules/ | xargs sed -i '' 's=React/Core=React-Core=g'
  • I have the Xcode 12.4 command line tools installed.

I've unfortunately run out of ideas here and I really need help to get this resolved.

@Haseeba393
Copy link

@jaswantjatav Thanks it solved issuse

@facebook facebook locked as resolved and limited conversation to collaborators Oct 10, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests