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

fatal error: module 'GoogleMapsBase' not found #1722

Closed
yokesharun opened this issue Oct 22, 2017 · 9 comments
Closed

fatal error: module 'GoogleMapsBase' not found #1722

yokesharun opened this issue Oct 22, 2017 · 9 comments

Comments

@yokesharun
Copy link

iOS build got failed due to fatal error: module 'GoogleMapsBase' not found
i followed this doc also https://github.com/airbnb/react-native-maps/blob/master/docs/installation.md
please help me to fix this issue. Thanks in advance

simulator screen shot - iphone 6 - 2017-10-22 at 19 52 24

@yokesharun
Copy link
Author

yokesharun commented Oct 22, 2017

These are the steps i have already done.

  • cleaned the code in xocde
  • took rebuild
  • did react-native link react-native-maps
  • pod install
  • added the lines in AppDelegate.m

here is my Podfile


# You Podfile should look similar to this file. React Native currently does not support use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'

# Change 'ios_user' to match the target in your Xcode project.
target 'ios_user' do
  rn_path = '../node_modules/react-native'

  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 'GoogleMaps'  # Remove this line if you don't want to support GoogleMaps on iOS
  pod 'react-native-maps', path: '../node_modules/react-native-maps'
  pod 'react-native-google-maps', path: '../node_modules/react-native-maps'  # If you need GoogleMaps support 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

these are the dependencies in package.json file

"dependencies": {
    "moment": "^2.19.1",
    "react": "16.0.0-beta.5",
    "react-native": "0.49.2",
    "react-native-elements": "^0.17.0",
    "react-native-maps": "^0.17.1",
    "react-native-simple-radio-button": "^2.6.2",
    "react-native-vector-icons": "^4.4.0",
    "validate.js": "^0.11.1"
  },

@michelalbers
Copy link

Do not link AND use cocoapods. Do one of those two :)

@rborn
Copy link
Collaborator

rborn commented Oct 24, 2017

@michelalbers does it work for you ?

Thnx :)

@michelalbers
Copy link

@rborn see #990 and this PR: #1732

@rborn
Copy link
Collaborator

rborn commented Oct 25, 2017

@michelalbers @yokesharun I managed to make it work by following this: https://codeburst.io/react-native-google-map-with-react-native-maps-572e3d3eee14 but only after I deleted the ios, android, node_modules folder, clear watchman and run a react-native upgrade and npm install and then started the app with yarn start --clear-cache

@michelalbers
Copy link

@rborn which react-native version do you use?

@rborn
Copy link
Collaborator

rborn commented Oct 25, 2017

@michelalbers

"dependencies": {
    "react": "16.0.0-beta.5",
    "react-native": "0.49.3",
    "react-native-bordered-image": "^0.1.2",
    "react-native-maps": "^0.17.1",
    "react-native-render-html": "^3.5.0-rc.3",
    "react-native-router-flux": "^4.0.0-beta.22",
    "react-navigation": "^1.0.0-beta.13"
  },

@dylanitorium
Copy link

So I got stuck with this error for a few hours and got myself real wound up.

I tried all the suggestions posted I followed the guide suggested by @rborn but to the letter to no avail.

Turns out I wasn't paying attention to a warning present by the pod install which was trying to tell me about conflicts in my framework search paths.

I added $(inherited) to the top of my Framework Search Paths for the project in xcode and this fixed my the issue for me.

Hopefully this can help someone else!

@alvelig
Copy link
Contributor

alvelig commented Dec 9, 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 9, 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

5 participants