[英]Geofire (iOS) clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm using GeoFire (2.0.0) in the Swift project, after today's update pods when the project is going to Xcode shows clang: error: linker command failed with exit code 1 (use -v to see invocation) in the Geofire framework. 我在Swift项目中使用GeoFire(2.0.0) ,在今天的更新pod之后,当项目进入Xcode时显示clang:错误:链接器命令失败,退出代码1(使用-v查看调用)在Geofire框架中。 Tell me, how can I fix this?
告诉我,我该如何解决这个问题?
I install Geofire via Cocaopods as follows pod 'GeoFire', :git => ' https://github.com/firebase/geofire-objc.git ' 我通过Cocaopods安装Geofire如下'pod'GeoFire',:git =>' https://github.com/firebase/geofire-objc.git '
Update: 更新:
ld: framework not found nanopb
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Update 1 : When I install the pods I in the terminal can see that this component is used 更新1 :当我在终端中安装pod时,我可以看到使用了该组件
Using nanopb (0.3.8)
I was advised here to solve this problem. 我被建议在这里解决这个问题。
I changed my firebase pods and it solved geofire problem. 我改变了我的firebase pod并解决了geofire问题。 Interesting situation with subsequent updates, it turns out if you use Geofire it will not work to update Firebase on versions higher than 4.0.3
随后更新的有趣情况,如果您使用Geofire,它将无法在高于4.0.3的版本上更新Firebase
# Firebase
pod 'Firebase', '4.0.3'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
# Push notification
pod 'Firebase/Core'
pod 'Firebase/Messaging'
Update: The second method. 更新:第二种方法。 Need to write this in Podfile
需要在Podfile中写这个
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'GeoFire' then
target.build_configurations.each do |config|
config.build_settings['FRAMEWORK_SEARCH_PATHS'] = "#{config.build_settings['FRAMEWORK_SEARCH_PATHS']} ${PODS_ROOT}/FirebaseDatabase/Frameworks/ $PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac $PODS_CONFIGURATION_BUILD_DIR/nanopb"
config.build_settings['OTHER_LDFLAGS'] = "#{config.build_settings['OTHER_LDFLAGS']} -framework FirebaseDatabase"
end
end
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.