简体   繁体   中英

how can I install Firebase authentication in terminal using cocoa pods?

When I enter pod 'Firebase/Auth' it isn't installing the pod. Its saying this: [!] Unable to satisfy the following requirements:

  • Firebase/Auth required by Podfile

    None of your spec sources contain a spec satisfying the dependency: Firebase/Auth .

    You have either:

    • out-of-date source repos which you can update with pod repo update .
    • mistyped the name or version.
    • not added the source repo that hosts the Podspec to your Podfile.

    Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.

    [!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.

I have said in the pod file - pod 'Firebase' and that is installing fine, but I don't know why 'Firebase/Auth' isn't installing.

This is using swift and Xcode is any of you were wondering, please can someone suggest what I can do to solve this, thanks

This is the pod file:

platform: ios, '8.0'
use_frameworks!

target: 'Lifelapse' do
pod 'Canvas'
pod 'Firebase'
pod 'Firebase/Auth'

end

EDIT: The solution was just to 'pod repo update' which worked perfectly. However now I have 27 error messages - 错误讯息 Please help!

I did more or less than the guy told us but my steps were a little different:

  1. On the Terminal: go to your project folder:

    1.1 sudo Desktop/YourApp

    1.2 YOURMAC:YourApp Fernanda$ sudo pod init

  2. Change your file Podfile to:

     # Uncomment this line to define a global platform for your project platform :ios, '8.0' target 'YourApp' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for YourApp pod 'Firebase' end 
  3. On the Terminal: pod install

  4. Now, change your file Podfile again to:

     # Uncomment this line to define a global platform for your project platform :ios, '8.0' target 'YourApp' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for YourApp pod 'Firebase' pod 'Firebase/Auth' end 
  5. On the Terminal: pod update

try update platform version 8.0 to 9.0

platform: ios, '9.0'
use_frameworks!

target: 'Lifelapse' do
pod 'Canvas'
pod 'Firebase'
pod 'Firebase/Auth'

end

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