尝试在 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/