构建版本:未找到“Google-Maps-iOS-Utils/GMUHeatmapTileLayer.h”文件,

e0bqpujr  于 2022-12-05  发布在  iOS
关注(0)|答案(1)|浏览(97)

使用静态链接React-native-map产品GMUHeatmapTileLayer.h错误。我正在尝试创建firebase和Map应用程序,要使用firebase,需要use_frameworks!:linkage =〉:static使用该链接,Map不工作,并产生多个错误。
我跟随这个问题stackoverflow question来解决airmaps的问题。现在我有gmuheatmaptile. h文件没有找到错误。
不使用use_frameworks!:linkage =〉:静态项目将成功生成。

uelo1irk

uelo1irk1#

我已经通过在pod文件中添加这些行解决了问题

$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

相关问题