ios - 带有 ios 和 xcode 的 firebase "clang: error: linker command failed"

标签 ios firebase

尝试在 iOS 上使用 firebase,之前从未处理过 pod

1) 我在 ios 中用 swift for iPhone 创建了一个项目..叫做 stupid 2)这是项目所在的位置和创建的文件:

~/Documents/swift/stupid$ ls
stupid          stupid.xcodeproj

3) 这就是 firebase 所说的:

Move the GoogleService-Info.plist file you just downloaded into the root of your Xcode project and add it to all targets.

~/Documents/swift/stupid/stupid$ ls
AppDelegate.swift       GoogleService-Info.plist    stupid.xcdatamodeld
Assets.xcassets         Info.plist
Base.lproj          ViewController.swift

4) 我在 ~/Documents/swift/stupid 目录中运行以下命令 ~/Documents/swift/stupid$ pod init

Google services use CocoaPods to install and manage dependencies. Open a terminal window and navigate to the location of the Xcode project for your app.

Create a Podfile if you don't have one:

pod init
Open your Podfile and add:

pod 'Firebase/Core'
includes Analytics by default help_outline
Save the file and run:

pod install

5)我构建项目

现在我得到了这个错误。谁能告诉我为什么?

clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

仔细检查您打开的是工作区而不是 xcodeproj。

关于ios - 带有 ios 和 xcode 的 firebase "clang: error: linker command failed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46044190/

相关文章:

swift - 从 Firebase 读取到 UIpickerView

swift - 范围过滤和按不同字段排序 Firestore Swift

ios - iOS 表格/列表中的粘性菜单

ios - 调用performSelector的结果: on a "sleeping" thread's current run loop?

iphone - 将物体中心与点进行比较?

ios - 在 Swift 中过滤字典的 NSArray

Swift - 从 Firebase 检索自动分配的 ID

swift - 如何在 Swift 中获取 Firebase 的自动生成 key ?

IOS 7.0 : How to change values of layer. 导航按钮的角半径

java - 请求太多 FirebaseError