Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

console.error: "react-native-maps" AirGoogleMaps dir must be added to your xCode project

console.error: "react-native-maps" AirGoogleMaps dir must be added to your xCode project

I got this error when I am trying to test the example in react-native-maps module.

Github: https://github.com/airbnb/react-native-maps/tree/master/example

It is obvious that I should add the dir the to my Xcode project but I don't know how to add them.

May I have an example of adding dir to a Xcode project?

image of error

like image 863
ykn121 Avatar asked Dec 21 '16 15:12

ykn121


1 Answers

I had this problem using react native 0.61, the solution on my case was: Stop the Metro Bundler, After that go to the pods directory:

cd ..
cd ios

Install again the pods:

pod install

Go to the project root:

cd ..

and run the project again npx react-native run-ios

This is the segment of my Podfile

  rn_maps_path = '../node_modules/react-native-maps'
  pod 'react-native-google-maps', :path => rn_maps_path
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'
like image 168
Milton Rincon Avatar answered Sep 20 '22 22:09

Milton Rincon