Mingyu Jeon
Mingyu Jeon

Reputation: 1783

React Native, Invariant Violation: Native component for "AIRMap" does not exist

I'm trying to install react-native-maps I followed the document for installation.

My install process was like below.

I used react-native link instead of cocoaPod.

However, build failed.

** BUILD FAILED **

The following build commands failed:

CompileC /Users/dadumvu/work/foodup-mobile-RN/ios/build/Build/Intermediates.noindex/AirMaps.build/Debug-iphonesimulator/AirMaps.build/Objects-normal/x86_64/AIRGoogleMapPolygonManager.o AirGoogleMaps/AIRGoogleMapPolygonManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure)

My version's here.

"react-native-maps": "^0.21.0"

"react-native": "0.55.4"

If anyone could solve this issue, please let me know about it. Thank you.

Upvotes: 3

Views: 690

Answers (1)

Mahdi Bashirpour
Mahdi Bashirpour

Reputation: 18823

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

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

Upvotes: 1

Related Questions