【问题标题】:swift linker command failed with exit code 1 Google Maps iOS Util pod install快速链接器命令失败,退出代码为 1 Google Maps iOS Util pod install
【发布时间】:2019-03-19 06:37:37
【问题描述】:

我的构建失败,swift linker command failed with exit code 1。日志特别说symbol(s) not found for architecture x86_64

自从我尝试设置 Google-Maps-iOS-Utils 以来就发生了这种情况。

这是我的 Podfile。有一个pre_install 部分,因为没有它,pod install 将有一个'Pods-Project' target has transitive dependencies that include static binaries 错误。

# platform :ios, '9.0'

target 'My App' do
  use_frameworks!

  platform :ios, '11.3'

  # Pods for My App
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils' #the new pod that caused issues
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'GoogleSignIn'
  pod 'Firebase/Database'
  pod 'Firebase/Storage'
  pod 'FirebaseUI/Storage'
  pod 'Fabric', '~> 1.7.9'
  pod 'Crashlytics', '~> 3.10.5'

  target 'My AppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end

这是我的 Bridging-Header.h

#ifndef Bridging_Header_h
#define Bridging_Header_h
#import <Google-Maps-iOS-Utils/GMUMarkerClustering.h>
#endif /* Bridging_Header_h */

我尝试的一些故障排除措施: 清理构建文件夹并再次构建; 重新集成 pod 并重新安装 pod。

感谢任何帮助。谢谢。

【问题讨论】:

标签: ios swift google-maps cocoapods google-maps-ios-utils


【解决方案1】:

This solution 为我工作。 Podfile 中也不需要这部分。

pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end

我还必须在 Build Phases 中删除框架的二进制搜索路径。

【讨论】:

    【解决方案2】:

    尝试在构建设置的二进制搜索路径中添加库位置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-01
      • 2019-08-01
      • 1970-01-01
      • 2018-11-03
      • 2015-08-06
      • 2012-05-27
      相关资源
      最近更新 更多