Cocoapods: Unable to find a specification for `Firebase/Core`

前端 未结 8 1930
时光说笑
时光说笑 2020-12-25 12:36

I have this in podfile:

pod \'Firebase/Core\'
pod \'Firebase/Messaging\'

but getting this error:

[!] Unable to find

相关标签:
8条回答
  • 2020-12-25 12:38

    If it still doesn't work, remove cocoapods directory rm -rf ~/.cocoapods and re-setup cocoapods using pod setup

    Hope that helps

    0 讨论(0)
  • 2020-12-25 12:43

    None of the approaches mentioned worked for me. Here is how I made it to work, however:

    1. Comment out all of your pods in your Podfile.
    2. Comment them back in one-by-one and run pod install after each
    3. Clean and run

    I hope it will help somebody.

    0 讨论(0)
  • 2020-12-25 12:45

    Try to update pod repository

    pod repo update
    

    If doesn't help show log from

    pod install --verbose
    

    Edit:

    try to add

    source 'https://github.com/CocoaPods/Specs.git'
    

    to your Podfile. If doesn't help probably there is a problem with your local pod repo. You can fix this using:

    pod repo remove master
    pod setup
    pod install
    
    0 讨论(0)
  • 2020-12-25 12:47

    try to delete the file podfile.lock
    it helps with issue:

    [!] CocoaPods could not find compatible versions for pod "Firebase/Core":
    In snapshot (Podfile.lock):
    Firebase/Core (= 4.8.1)

    0 讨论(0)
  • 2020-12-25 12:59

    Check if your podfile looks like this and then execute pod install:

    platform :ios, '10.0'
    use_frameworks!
    
    target '<YOUR APP TARGET>' do
    
      # Firebase
      pod 'Firebase'
      pod 'Firebase/Core'
      pod 'Firebase/Messaging'
    
    end
    
    post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['SWIFT_VERSION'] = '3.0'
        end
      end
    end
    
    0 讨论(0)
  • 2020-12-25 13:02

    had the same problem.

    what really worked for me was gem uninstall cocoapods where I found that I had 11 (!) cocoapods versions. I chose to uninstall all and then gem install cocoapods:1.4.0

    All good now.

    0 讨论(0)
提交回复
热议问题