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

Ajnas Askar picture Ajnas Askar · Jul 13, 2018 · Viewed 7.9k times · Source

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 ?

Answer

Mahdi Bashirpour picture Mahdi Bashirpour · Aug 15, 2018

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