我的构建失败,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/