我的构建因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 */
我尝试过的一些故障排除措施: 清理构建文件夹并再次构建; 取消集成吊舱并重新安装吊舱。
感谢您的帮助。谢谢。
答案 0 :(得分:0)
This solution为我工作。在Podfile中也不需要此部分。
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
我还必须在构建阶段中删除该框架的二进制搜索路径。
答案 1 :(得分:0)
尝试在构建设置的二进制搜索路径中添加库位置。