Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix"AIRMap" was not found in the UIManager error in react native?

Unhandled JS Exception: Invariant Violation: requireNativeComponent: "AIRMap" was not found in the UIManager.

This error is located at: in AIRMap (at MapView.js:760) in MapView (at App.js:25) in RCTView (at View.js:43) in App (at renderApplication.js:32) in RCTView (at View.js:43) in RCTView (at View.js:43) in AppContainer (at renderApplication.js:31)

how to fix this error in react native ios ?

like image 626
Ajnas Askar Avatar asked Jul 13 '18 05:07

Ajnas Askar


People also ask

What is Airmap in react native?

React Native Google Map. Google map is used to locate an address, navigate, and search location in the mobile devices. The Google Maps shows the location (latitude and longitude) using dot Marker. In the react-native, Google Maps is easily integrated using react-native-maps npm library.

How do I add a map to react native app?

Adding a marker in React Native Maps Start by importing Marker from react-native-maps . import { Marker } from "react-native-maps"; Next, render the <Marker /> component as a child of <MapView /> . Pass the coordinate for the marker in the coordinate prop.


1 Answers

Add to ios/YOUR_PROJECT_NAME/AppDelegate.m

@import GoogleMaps; //add this line if you want to use Google Maps

and

[GMSServices provideAPIKey:@"_YOUR_API_KEY_"]; // add this line using the api key obtained from Google Console

like image 155
Mahdi Bashirpour Avatar answered Nov 13 '22 19:11

Mahdi Bashirpour