react-native-maps: [!] CocoaPods could not find compatible versions for pod "React/BatchedBridge

Is this a bug report?

Yes.

Have you read the Installation Instructions?

Yes.

Environment

"react": "^16.3.0-alpha.1",
"react-native": "0.54.0",
"react-native-maps": "^0.20.1"

***iOS , using AppleMaps or GoogleMaps

Steps to Reproduce

Steps

$ npm install -g react-cli
$ react-cli init myProject
$ cd myProject
$ npm install
$ npm install react-native-maps --save 
$ cd ios/
$ vim Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'myProject' do
  rn_path = '../node_modules/react-native'
  rn_maps_path = '../node_modules/react-native-maps'

  pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
  pod 'React', path: rn_path, subspecs: [
    'Core',
    'RCTActionSheet',
    'RCTAnimation',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket',
    'BatchedBridge'
  ]

  pod 'react-native-maps', path: rn_maps_path

  pod 'GoogleMaps'  # Remove this line if you don't want to support Google Maps on iOS
  pod 'react-native-google-maps', path: rn_maps_path  # Remove this line if you don't want to support Google Maps on iOS
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
$ pod install

Expected Behavior

I would expect the pod installation to succeed

Actual Behavior

pod install
Analyzing dependencies
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `react-native-google-maps` from `../node_modules/react-native-maps`
Fetching podspec for `react-native-maps` from `../node_modules/react-native-maps`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga/yoga.podspec`
[!] CocoaPods could not find compatible versions for pod "React/BatchedBridge":
  In Podfile:
    React/BatchedBridge (from `../node_modules/react-native`)

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

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

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

Reproducible Demo

N/A

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 15
  • Comments: 22 (6 by maintainers)

Most upvoted comments

BatchedBridge was deleted in the latest release. It’s mentioned in the release notes. So it looks like that it should be removed from Pods file.

@vinicius5581 can you try a pod update?

If you still having issues I’ve created example project which runs with latest (at the point of writing) RN 0.56.0 and works with ‘CxxBridge’ both iOS and tvOS project https://www.npmjs.com/package/react-native-vanilla

Using ‘CxxBridge’ resolved my issue. It should really be aded to the changelog for React 0.54 where the removal of BatchedBridge was listed. This would avoid others having to do a massive google search.

This looks like you are pulling react-native-maps from a published release in npm.

Please use the latest code from git.

In package.json:

“react-native-maps”: “github:react-community/react-native-maps”