Home > Net >  build: 'Google-Maps-iOS-Utils/GMUHeatmapTileLayer.h' file not found. React-native
build: 'Google-Maps-iOS-Utils/GMUHeatmapTileLayer.h' file not found. React-native

Time:12-01

Using static link React-native-map product GMUHeatmapTileLayer.h error. I am trying to create firebase and map app, to use firebase it need use_frameworks! :linkage => :static using that, map does not work and produce multiple errors.

I followed this issue stackoverflow question to solve airmaps problem. Now i have GMUHeatmapTile.h file not found error.

without using use_frameworks! :linkage => :static project will build successfylly.

CodePudding user response:

I have solved my problem by adding these lines in pod file

  $static_library = [
    'React',
    'Google-Maps-iOS-Utils',
    'GoogleMaps',
    'react-native-google-maps',
    'react-native-maps',
    'React-hermes'
  ]

  pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
    installer.pod_targets.each do |pod|
      bt = pod.send(:build_type)
      if $static_library.include?(pod.name)
        puts "Overriding the build_type to static_library from static_framework for #{pod.name}"
        def pod.build_type;
          Pod::BuildType.static_library
        end
      end
    end
    installer.pod_targets.each do |pod|
      bt = pod.send(:build_type)
      puts "#{pod.name} (#{bt})"
      puts "  linkage: #{bt.send(:linkage)} packaging: #{bt.send(:packaging)}"
    end
  end

  • Related