33

I have this in podfile:

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

but getting this error:

[!] Unable to find a specification for Firebase/Core

i tried with pod 'Firebase' still can't find it.

Podfile:

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!

target 'caffetouch manager' do
    pod 'Firebase/Core'
    pod 'Firebase/Messaging'
    pod 'Alamofire', '~> 4.0.0'
    pod 'AlamofireNetworkActivityIndicator', '~> 2.0.1'
    pod 'IQKeyboardManagerSwift', '~> 4.0.6'
    pod 'MZFormSheetPresentationController', '~> 2.4.2'
    pod 'Kingfisher', '~> 3.1.3'
    pod "GMStepper"
    pod 'DKImagePickerController', '~> 3.4.0'
    pod 'Siren', '~> 1.0.2'
    pod 'Eureka', '~> 2.0.0-beta.1'
    pod 'SwiftyJSON'
    pod 'ObjectMapper', '~> 2.1'
    pod 'NVActivityIndicatorView'
    pod 'SwiftDate', '~> 4.0.5'
    pod 'SimpleAlert' '~> 2.0.1'

    pod 'BTNavigationDropdownMenu', :git => 'https://github.com/PhamBaTho/BTNavigationDropdownMenu.git', :branch => 'swift-3.0'
    pod 'ENSwiftSideMenu', :git => 'https://github.com/evnaz/ENSwiftSideMenu.git', :branch => 'master'
    pod 'SkyFloatingLabelTextField', git: "https://github.com/MLSDev/SkyFloatingLabelTextField.git", branch: "swift3"
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
Mirza Delic
  • 4,119
  • 12
  • 55
  • 86

9 Answers9

84

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
Piotr Labunski
  • 1,638
  • 4
  • 19
  • 26
4

try below commands:

pod repo remove master
pod repo update
pod install --verbose
Rajesh.k
  • 2,327
  • 1
  • 16
  • 19
4

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)

Alexander
  • 2,925
  • 3
  • 33
  • 36
Yoni Katz
  • 107
  • 1
  • could you also please write what exactly deleting the lock file does? Can it have any side effects? – Alexander Sep 11 '18 at 15:42
  • deleting pod lock file could potentially break project and might be catastrophic, as newer versions of pods might have changed. Doing this requires proper migration for each of the updated pod. – Aamir Oct 26 '18 at 09:47
3

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
ronatory
  • 7,156
  • 4
  • 29
  • 49
3

This worked for me by updating cocoapods and my pod repo:

sudo gem install cocoapods
pod repo update
steve-o
  • 1,303
  • 1
  • 14
  • 20
2

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.

AydinAngouti
  • 379
  • 3
  • 14
2

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

Hope that helps

ajpaul
  • 21
  • 3
  • Yes. If your cocoapod git repo is bad. This will work. Because my repo was not getting updated. – ajpaul Mar 06 '18 at 20:39
1

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.

Catarino
  • 233
  • 2
  • 8
0

Hello I just delete this row if you are using unity and try to run for ios

source 'https://github.com/CocoaPods/Specs.git'
Romy
  • 498
  • 9
  • 14