RCTConvert+AirMap.h file not found Error on React Native on IOS

Viewed 2007

enter image description here

i have this Error . RCTConvert+AirMap.h file not found Error on React Native on IOS

2 Answers

I was able to fix this with:

  1. Adding $(SRCROOT)/../node_modules/react-native-maps/lib/ios/AirMaps in the project target header

  2. Moving the pod 'react-native-google-maps', path: rn_maps_path above use_native_modules (it was previously below that) in the Podfile

  3. Added:

  post_install do |installer|
      //...
      installer.pods_project.targets.each do |target|
      if target.name == 'react-native-google-maps'
        target.build_configurations.each do |config|
          config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
        end
      end
      
    end
  end
  1. after step 3 if still not working remove all the cache (pod deintegrate, pod install, remove derived data, clean build)

Latest Update

For config similar or latest


    "react": "17.0.1",
    "react-native": "0.64.2",
    "react-native-cli": "^2.0.1",
    "react-native-maps": "^0.28.0",

Its pretty much easier to configure React Native Maps using GoogleMap and other map providers.

Auto-linking does not solve the problem so you will have to manually tell xcode where the native code is. There are 2 ways to tell

  1. Manually add files/folders to Xcode using these instructions here
  2. The Simplest. No need to goto Xcode for tweaking header search path

2. Simplest

# Podfile

pod 'react-native-google-maps', :path => '../../../node_modules/react-native-maps/'
pod 'react-native-maps', :path => '../../../node_modules/react-native-maps/'

# These might not be necessary
# Please build without these. If could not build, add these as well
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'

in AppDelegate.m file

#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h> // this line is alreaady there.  Add the line below
#import <GoogleMaps/GoogleMaps.h>

...

...

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions // this line is alreaady there.  Add the line below
{
+  [GMSServices provideAPIKey:@"AIzaEEBBLn-PhCDDD1AnC_h66yH8LEEUkd14WW0"]; // add this line using the api key obtained from Google Console

Notes:

  1. replace AIzaEEBBLn-PhCDDD1AnC_h66yH8LEEUkd14WW0 with your own API Key from google console.
  2. In my case I am using monorepo technique so '../../../node_modules/react-native-maps/'. In your case its '../node_modules/react-native-maps/'
  3. + and - sign should be used. They are language defined entities. No type error
Related