0

I have received a project from a colleague that does not have the frameworks included in the files, I didn't think it would be that big of an issue as I have used Cocoapods in the past without ever running into any problems, however I am really having trouble with the install of these. Below is my Podfile and the error I am receiving when attempting to do a pod install. Can someone please tell me what is going wrong and give me some idea of how to fix it.

The error log:

Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[!] CocoaPods could not find compatible versions for pod "React/RCTVibration":
  In Podfile:
    React/RCTVibration (from `../node_modules/react-native`)

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

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.

[!] Automatically assigning platform `iOS` with version `9.0` on target `bestride` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`

The Podfile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

project 'bestride.xcodeproj'

target 'bestride' do
    rn_path = '../node_modules/react-native'
    rn_maps_path = '../node_modules/react-native-maps'
  
    # See http://facebook.github.io/react-native/docs/integration-with-existing-apps.html#configuring-cocoapods-dependencies
    pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
    pod 'React', path: rn_path, subspecs: [
      'Core',
      'CxxBridge',
      'DevSupport',
      'RCTActionSheet',
      'RCTAnimation',
      'RCTGeolocation',
      'RCTImage',
      'RCTLinkingIOS',
      'RCTNetwork',
      'RCTSettings',
      'RCTText',
      'RCTVibration',
      'RCTWebSocket',
    ]
  
    # React Native third party dependencies podspecs
    pod 'DoubleConversion', :podspec => "#{rn_path}/third-party-podspecs/DoubleConversion.podspec"
    pod 'glog', :podspec => "#{rn_path}/third-party-podspecs/glog.podspec"
    # If you are using React Native <0.54, you will get the following error:
    # "The name of the given podspec `GLog` doesn't match the expected one `glog`"
    # Use the following line instead:
    #pod 'GLog', :podspec => "#{rn_path}/third-party-podspecs/GLog.podspec"
    pod 'Folly', :podspec => "#{rn_path}/third-party-podspecs/Folly.podspec"
  
    # react-native-maps dependencies
    pod 'react-native-maps', path: rn_maps_path
    pod 'react-native-google-maps', path: rn_maps_path  # Uncomment this line if you want to support GoogleMaps on iOS
    pod 'GoogleMaps'  # Uncomment this line if you want to support GoogleMaps on iOS
    pod 'Google-Maps-iOS-Utils' # Uncomment this line if you want to support GoogleMaps on iOS
    pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
    pod 'FBSDKCoreKit', '~>4.42.0'
    pod 'FBSDKLoginKit', '~>4.42.0'
    pod 'FBSDKShareKit', '~>4.42.0'
    pod 'GoogleSignIn'
    pod 'RNGoogleSignin', :path => '../node_modules/react-native-google-signin'

    pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'

    pod 'react-native-camera', :path => '../node_modules/react-native-camera'

    pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'

    pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'

    pod 'RNSVG', :path => '../node_modules/react-native-svg'

    pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
    pod 'react-native-date-picker', :path => '../node_modules/react-native-date-picker'
    pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'

    pod 'react-native-webview', :path => '../node_modules/react-native-webview'

  end
  
  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == 'react-native-google-maps'
        target.build_configurations.each do |config|
          config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
        end
      end
      if target.name == "React"
        target.remove_from_project
      end
    end
  end
1

2 Answers 2

0

Try doing this

pod deintegrate
pod install
pod update
Sign up to request clarification or add additional context in comments.

Comments

0

A good starting point can be to run a pod deintegrate command.

In the past when I've had issues with CocoaPods, restarting my configuration from scratch resolved my errors.

You could try the following commands to start from a clean slate. Make sure to shelve your Pod file elsewhere so you can reference what frameworks you wanted to install.

$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod cache clean --all
$ rm Podfile

Then, follow up and perform:

pod install
pod update

Alternatively, you may have an issue with your node installation since you are using React, in which case I'd recommend referencing this post

Note: what could be happening is that your frameworks are simply out of date, and they may be cached in your system, thus linking to older mismatched references.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.