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 "GoogleMaps": #3459

Closed
wmonecke opened this issue Jun 9, 2020 · 25 comments
Closed

CocoaPods could not find compatible versions for pod "GoogleMaps": #3459

wmonecke opened this issue Jun 9, 2020 · 25 comments

Comments

@wmonecke
Copy link

wmonecke commented Jun 9, 2020

Bug report

Hi!

I updated to RN 0.62.2 and also updated react-native-maps to the latest version (0.27.1) and got the following error:

[!] CocoaPods could not find compatible versions for pod "GoogleMaps":
  In Podfile:
    GoogleMaps

    react-native-google-maps (from `../node_modules/react-native-maps`) was resolved to 0.27.1, which depends on
      GoogleMaps (= 3.5.0)

    react-native-google-places (from `../node_modules/react-native-google-places`) was resolved to 3.1.2, which depends on
      GoogleMaps (~> 3.1.0)

I tried running pod update with no success. Also deleted pods, cleared cache and ran pod install and still had this conflict. Any ideas? I am not really savvy about Pods.

Podfile

 # react-native-maps dependencies
  pod 'react-native-maps', path: '../node_modules/react-native-maps'
  pod 'react-native-google-maps', path: '../node_modules/react-native-maps'
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'
@christopherdro
Copy link
Collaborator

run pod repo update then run pod install again

@jimsheen
Copy link

jimsheen commented Jul 6, 2020

Still having the same issue pod repo update and pod install didn't work for me. Any help would be greatly appreciated thanks :)

@irvinSing
Copy link

@jimsheen if you haven't tried this, you might need to remove podfile.lock before executing pod repo update.

@L0rdCr1s
Copy link

hey guys, did anyone find a solution for this, I'm stuck with the same problem

@nschild
Copy link

nschild commented Aug 13, 2020

pod update GoogleMaps worked for me to upgrade to 3.5.0. Might need to run pod repo update first

@L0rdCr1s
Copy link

I deleted Pods folder, Podfile.lock and node_modules folder then did yarn install but when I do pod install I get this error

Auto-linking React Native modules for target `customerapp`: RNCAsyncStorage, RNCMaskedView, RNDateTimePicker, RNGestureHandler, RNPermissions, RNReanimated, RNSVG, RNScreens, RNVectorIcons, ReactNativeLocalization, lottie-react-native, react-native-geolocation, react-native-google-places, react-native-maps, react-native-netinfo, react-native-onesignal, react-native-safe-area-context, react-native-splash-screen, and react-native-webview
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 "GoogleMaps":
  In Podfile:
    react-native-google-maps (from `../node_modules/react-native-maps`) was resolved to 0.27.1, which depends on
      GoogleMaps (= 3.5.0)

    react-native-google-places (from `../node_modules/react-native-google-places`) was resolved to 3.1.2, which depends on
      GoogleMaps (~> 3.1.0)

Specs satisfying the `GoogleMaps (= 3.5.0), GoogleMaps (~> 3.1.0)` dependency were found, but they required a higher minimum deployment target.

and pod update GoogleMaps doesn't work without Podfile.lock

@L0rdCr1s
Copy link

L0rdCr1s commented Aug 20, 2020

after a lot of trials i found a solution, somehow react-native-google-places GoogleMaps version was conflicting with react-native-maps so i had to apply a patch to update it to GoogleMaps version 3.5.0

link to the patch https://gist.github.com/L0rdCr1s/b955c35ba2c467b8a01d13750be43d80

i used patch-package to apply it, if you don't know how to use it like i didn't, create a folder called patches on the root of your project directory and then paste the .patch file from the link.

after that install patch-package by running yarn add --dev patch-package postinstall-prepare after installing run yarn patch-package

if everything went well pod install should work fine now

hope this helps someone

@radimchorba
Copy link

@L0rdCr1s for some reasons link you provided doesn't seem to point to the patch
Could you pls point me out to another source? Thank you very much in advance!

@L0rdCr1s
Copy link

@radimchorba sorry for that, it's already updated.

@radimchorba
Copy link

@L0rdCr1s Thank you for quick turnaround!

@badalsaibo
Copy link

Inside <app>/ios/Podfile find the line which has pod 'GoogleMaps' and change it to, pod 'GoogleMaps', '3.5.0'. The version number can be different for different projects. Mine was 3.5.0 as described in the error message.

After the change, run pod install and you're good to go. Note that for M1 Macs, use
$ sudo arch -x86_64 gem install ffi
$ arch -x86_64 pod install

@NachoJusticia
Copy link

I solved it like this:

  • I checked my node_modules/react-native-maps/react-native-google-maps.podspec and I have the following versions:
require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
...
  s.dependency 'GoogleMaps', '5.1.0'
  s.dependency 'Google-Maps-iOS-Utils', '3.10.3'
...
  • then I updated my Podfile like this:
    rn_maps_path = '../node_modules/react-native-maps'
    pod 'react-native-google-maps', :path => rn_maps_path
    pod 'GoogleMaps', '5.1.0' # <<<<---- I added the '5.1.0' version here
    pod 'Google-Maps-iOS-Utils', '3.10.3' # <<<<---- I added the '3.10.3' version here
  • I ran pod install and I got this error: [!] The platform of the target inguru(iOS 10.0) may not be compatible withGoogleMaps (5.1.0) which has a minimum requirement of iOS 11.0.
  • I updated the minimum required build version to 11.0 on top of my Podfile:
platform :ios, '10.0'
  • I ran pod install again and everything worked.

@FanchenBao
Copy link

I followed the suggestion from @NachoJusticia , but I need to run pod install --repo-update to apply the version specifications.

@hlspablo
Copy link

image
Change this in the Xcode and in Podfile

@mucluck
Copy link

mucluck commented Sep 13, 2022

@AqeelAsghar
Copy link

go to you Podfile
update platform :ios, '10.0'
to platform :ios, '13.0'
and then install pod

@Josiassejod1
Copy link

delete your Podfile.lock and reinstall

@Shailja-niranjan
Copy link

@AqeelAsghar when i tried your solution , app is getting crashed on map screen in app.

@dibakar95
Copy link

If someone got this type of issue in 2023, deleting package-lock.json followed by podfile.lock might help.
If still issue is not resolved for you, look for ^(caret) sign before react-native-maps in package.json and remove it. And then try npm install & pod install

@sourabhsharmait
Copy link

@dibakar95 Thanks @dibakar95 for your comment. It works

@VLadislav9607
Copy link

I deleted dependencies versions in node_modules/react-native-maps/react-native-google-maps.podspec

s.dependency 'React-Core'
s.dependency 'GoogleMaps'
s.dependency 'Google-Maps-iOS-Utils'

It works for me

@LukaBabunadze
Copy link

pod install --repo-update

If someone got this type of issue in 2023, deleting package-lock.json followed by podfile.lock might help. If still issue is not resolved for you, look for ^(caret) sign before react-native-maps in package.json and remove it. And then try npm install & pod install

Works for me, thanks!!!

@Rustamyan94
Copy link

In the Podfile you can find the line "platform :ios, 13.4". change the iOS version as in the node_modules/react-native-maps/react-native-google-maps.podspec IOS version

@edoublin1111
Copy link

edoublin1111 commented Jan 30, 2024

I am using:

React-Native: v0.73.2
Node - 18.19.0
Yarn: 1.22.21
Cocoapods: 1.15.0
Xcode 15.2

And I tried to use "react-native-maps": "^1.7.1"

This is my case:

Screenshot 2024-01-30 at 18 13 03

[!] CocoaPods could not find compatible versions for pod "react-native-google-maps":
In Podfile:
react-native-google-maps (from ../node_modules/react-native-maps)

Specs satisfying the react-native-google-maps (from ../node_modules/react-native-maps) dependency were found, but they required a higher minimum deployment target.

After changing the minimum deployment target version to 13.4, I can run it.

@RaguRam1991
Copy link

pod 'Google-Maps-iOS-Utils', '4.2.2'

worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests