安装CocoaPods和Firebase Pod后,链接器命令失败,退出代码为1 [英] Linker command failed with exit code 1 after installing CocoaPods and firebase pod
问题描述
我正在尝试使用Firebase Pod,但是在尝试运行时收到此错误消息(参见图片).
I'm trying to use the firebase pod, however getting this (see image) error message when a run is attempted.
我遵循了本指南来安装Cocoapods并添加了Firebase对Podfile的依赖.
I followed this guide to install Cocoapods and added the firebase dependency to the Podfile.
p.s我尝试清理过很多次.
p.s I tried to clean it a bunch of times.
推荐答案
我被困了一段时间试图解决这个问题,但结果却很简单:)
如果您在项目中使用 Cocoapods
,则需要使用 xcworkspace
而不是 xcproject
进行构建.
如果您使用 Cocoapods
并从 xcproject
构建,它将忽略您需要的 Cocoapods
库.
I got stuck for awhile trying to solve this, but the solution turned out to be very easy :)
If you are using Cocoapods
in your project, one needs to use xcworkspace
to build instead of xcproject
.
If you are using Cocoapods
and build from xcproject
, it will ignore the Cocoapods
libraries you need.
这篇关于安装CocoaPods和Firebase Pod后,链接器命令失败,退出代码为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!