尝试在iOS上使用Firebase并且从未处理过Pod

1)我在iPhone上用swift在ios中创建一个项目。
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。

10-06 11:46