-1

I've been trying to build google maps on my ios React Native emulator but an error appeared saying that AIRrgooglemap dir must be added to Xcode which it has.

I researched ways to make it work such as this link https://cuneyt.aliustaoglu.biz/en/using-google-maps-as-provider-in-ios-with-react-native/ and others and started implementing and changing files on Xcode with no results. Below are the errors seen in React Native IOS emulator and Xcode build

React Native IOS error:

[React Native IOS error[1]

Xcode Error:

enter image description here

Thank you

Camille Basbous
  • 299
  • 5
  • 11
  • 34

1 Answers1

1

For your question on iOS, I checked the relevant documentation, there should be some steps missing, I suggest you use the following steps:

1.npm install react-native-maps --save

2.react-native link react-native-maps

3.Download the GoogleMaps library, copy it to the ios folder, and link the framework and configuration .bundle resources in Xcode as shown.

4.Configure the package.json file.

 "scripts":{
"start": "node node_modules/react-native/local-cli/cli.js start",
"postinstall": "./node_modules/react-native-maps/enable-google-maps 'ios/GoogleMaps-3.1.0/**'", },

5.npm install

6.Configure the code in AppDelegate.m.

7.Write the react-native code.

I made a sample project myself, you can refer to release v0.0.1.

Star
  • 116
  • 5
  • Hi star, thanks for replying, I have actually solved this long ago. I will still give you that thumbs up for your effort. cheers – Camille Basbous Jun 14 '19 at 14:02