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

GoogleMapsBase not found on xCode #990

Closed
gerardus1995 opened this issue Jan 23, 2017 · 19 comments
Closed

GoogleMapsBase not found on xCode #990

gerardus1995 opened this issue Jan 23, 2017 · 19 comments

Comments

@gerardus1995
Copy link

I'm trying to use google maps in an IOS application. I follow all the instructions in the guide https://github.com/airbnb/react-native-maps/blob/master/docs/installation.md and when i compile the program i get "GoogleMapsBase not found on xCode". I have no idea which the problem is so any help would be apreciated.

@antonsivogrivov
Copy link

+1

1 similar comment
@piloulac
Copy link

piloulac commented Feb 4, 2017

+1

@antonsivogrivov
Copy link

antonsivogrivov commented Feb 5, 2017

@gerardus1995 @piloulac , try to add $(SRCROOT)/Pods in framework search paths in xcode. And don't forget to set "recursive".

@softua
Copy link

softua commented Feb 10, 2017

+1

@softua
Copy link

softua commented Feb 10, 2017

@tonygriv it doesn't help

@Satya5614
Copy link

Thanks @tonygriv
Your solution worked for me.

@mmailhos
Copy link

A friend working on OSX is having this issue.
We followed the instructions in the guide together but at the end it is always the same issue with Module 'GoogleMapsBase' not found.
We have react-native 0.41.2 and react-native-maps 0.13.0.

@hubertwang
Copy link

We also have this problem with similar environment. We have RN 0.42.0 and react-native-maps 0.13.0. I checked the pod folder and found that GoogleMapsBase.framework is there. I think maybe the project is not properly configured.

@hubertwang
Copy link

hubertwang commented Apr 14, 2017

Oh, I found a workaround. If you want to manually import google maps into your project, do not add 'react-native-google-maps' to your Podfile.
Instead, just drag node_modules/ios/AirGoogleMaps to your project. Basically, they do the same thing, you only need to choose one of them.

Don't forget to add GoogleMaps to your Podfile:
pod 'GoogleMaps', '~> 2.1.1'
(2.1.1 is for react-native-maps 0.13.0)

Afterward, you can add API_KEY to your project:

#import <GoogleMaps/GoogleMaps.h>
...
[GMSServices provideAPIKey:@"YOUR_API_KEY"];

Then the error should go way now.

@samthui
Copy link

samthui commented Sep 14, 2017

My case is: I use RN 0.43.3 & react-native-maps 2.4.0, this issue happens. Then I downgrade my react-native-maps back to 2.3.1 and error goes away. Maybe there's incompatibility between your RN version & react-native-maps version.

@imbudhiraja
Copy link

imbudhiraja commented Sep 20, 2017

@airbnbelena Facing same issue with RN 0.45.1 & react-native-maps 0.15.0.
I have no idea which the problem is so any help would be appreciated.

@Esxiel
Copy link

Esxiel commented Oct 7, 2017

Is there still no update?

@seniorshahmar
Copy link

You need to do this

Click on your project (targets)
Click on Build Settings
Under Framework search paths (set your framework path)
Following information for getting framework search paths

Right click on your framework folder (for ex: GoogleMaps.framework)
select Get info
copy the path from General->where and paste this path in your framework search path (path should contain in single line)

@Palisand
Copy link

Palisand commented Oct 12, 2017

@seniorshahmar Why not just post the stack overflow link instead of copy-pasting the answer? Do those same steps from 2013 work 4 years later? My Framework Search Paths includes "${PODS_ROOT}/GoogleMaps/Base/Frameworks", which does exist, and yet I still face this issue.

@Palisand
Copy link

Palisand commented Oct 13, 2017

@Esxiel @imbudhiraja @samthui
Here's a potential solution: add s.compiler_flags = '-fno-modules' to react-native-maps/react-native-google-maps.podspec, then build.
Source: this PR.
Disclaimer: I have no idea how/why this works.

@Esxiel
Copy link

Esxiel commented Oct 13, 2017

Sorry for not updating. Mine worked few days ago, in my case it was because I used RN ver 0.49.1, downgraded and worked immediately.

@michelalbers
Copy link

Can confirm @Palisand's solution!

@michelalbers
Copy link

michelalbers commented Oct 25, 2017

PR #1732 created. Fixes the issue for me!

@alvelig
Copy link
Contributor

alvelig commented Dec 12, 2017

I recently made a fresh example build with pods and GoogleMaps with no issues.
https://github.com/alvelig/react-native-maps-pods-example.
Try to check it out or build through the README.MD. If it does not help, let me know.

@alvelig alvelig closed this as completed Dec 12, 2017
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