15

Using React Native Fetch Blob to perform some action. But the IOS platform not installing in pod file. Showing this...

[!] CocoaPods could not find compatible versions for pod "React/Core":
  In Podfile:
    react-native-fetch-blob (from `../node_modules/react-native-fetch-blob`) was resolved to 0.10.6, 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.

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

Kindly suggest some solution for that issue.

here is my pod file This is my pod file i am not able to add React native fetch blob in it.

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

target  do
  # Pods for 
  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-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'
  pod 'RNGestureHandler', :podspec => '../node_modules/react-native-gesture-handler/RNGestureHandler.podspec'

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'



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

  use_native_modules!
end

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

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

end

This is my pod file i am not able to add React native fetch blob in it.

3
  • Do you have pod 'React-Core', :path => '../node_modules/react-native/' in your Podfile? Commented Oct 9, 2019 at 13:31
  • @KevinEtore yes i have this in my pod file Commented Oct 9, 2019 at 13:37
  • Did you try pod install --repo-update as it suggests Commented Sep 24, 2021 at 10:23

2 Answers 2

63

In Root Directory

grep -rl "s.dependency 'React/Core'" node_modules/ | xargs sed -i '' 's=React/Core=React-Core=g'
Sign up to request clarification or add additional context in comments.

3 Comments

If you are using gnu version of sed then use grep -rl "s.dependency 'React/Core'" node_modules/ | xargs sed -i 's=React/Core=React-Core=g'
Update: you may need to execute this command every time you add a new package and run pod install. In my case, after installing a new package I got the error again and executed this command and it's fixed again.
@keshav Hi? What does this do? Can you please add a more details about this.
0

without instruction it will took too many hours to find. click=> nodemodules-> react-native-fetch-blob-> react-native-fetch-blob.podspec and then change "s.dependency 'React-Core'".

the pod will be download now but when you delete the node modules you have to install again don't forgot.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.