ios - swift 链接器命令失败,退出代码为 1 Google Maps iOS Util pod install

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

我的构建失败,swift 链接器命令失败,退出代码 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。

感谢任何帮助。谢谢。

最佳答案

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

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

我还必须删除构建阶段中二进制搜索路径的框架。

关于ios - swift 链接器命令失败,退出代码为 1 Google Maps iOS Util pod install,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55234982/

相关文章:

google-maps - 如何在 ionic 3 中为谷歌地图信息卡添加 slider

objective-c - NSSearchPathForDirectoriesInDomains 返回错误的目录

ios - 在 Swift 中调用 Slack Webincoming 钩子(Hook)但得到 "interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)"

ios - react native 密码自动填充 ios 11

swift - Firebase 通知和 Firebase 数据库功能不能在我的应用程序中同时工作

ios - 快速从 API 解析 CSV 文件时不使用分隔符分隔

ios - 在 iOS 中存储自定义对象(未实现 NSCoding)的方法

ios - stub Google map /地点 iOS SDK 调用以进行单元测试

ios - 如何在 Objective-C 中将视频保存在 iPhone Gallery 的特定文件夹中

Angular Google map 缩放仅工作一次,然后您无法更改缩放值