简体   繁体   中英

firebase “clang: error: linker command failed” with ios and xcode

Trying to use firebase with iOS and never dealt with pods before

1) I create a project in ios with swift for iPhone.. called stupid 2) Here is where the project is located and the files created:

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

3) This is what firebase says to do:

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) I run the below in the ~/Documents/swift/stupid dir ~/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) I build the project

And now I get this error. Who can tell me why?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM