CocoaPods - Unable to find a specification for `GoogleMaps`
Solution 1
Try removing source 'https://github.com/CocoaPods/Specs.git'
and moving use_frameworks!
out of the target block. Moreover you don't need to manually set the git path for both Alamofire and MarqueeLabel.
Try this:
platform :ios, '9.0'
use_frameworks!
target 'Migapixel' do
pod 'GoogleMaps'
pod 'Alamofire'
pod 'MarqueeLabel/Swift'
# Pods for Migapixel
end
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO' end end end
target 'MigapixelTests' do
inherit! :search_paths
end
target 'MigapixelUITests' do
inherit! :search_paths
# Pods for testing
end
Edit:
It seems that there's something wrong with your local repo. Try cleaning and reinstalling:
pod repo remove master
pod setup
Solution 2
i resolved the issue like that with these step:
- open terminal.
- go to your project path.
type:
pod repo update
- install pod again.
Solution 3
After trying many things Here is the fix!!
Imp: Make sure that you have these lines in your PodFile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
pod 'GoogleMaps'
end
If the above is fine then you need to update the pods: try the following steps:
Open a new terminal and run the following command in a temp directory.
pod try GoogleMaps
keep patience! It will take some time but will update the pod.
- Now try to install the pod in ur project again. It should work.Else try to run the following commands in the project dir:
pod repo update
try again. Comment in the case of any issue!!
Related videos on Youtube
Wasif Khalil
Updated on June 04, 2022Comments
-
Wasif Khalil almost 2 years
I'm new to iOS, i already have
Alamofire
andMarqueeLabel
on myPodfile
and now trying to addGoogleMaps
, it keeps showing this message,[!] Unable to find a specification for `GoogleMaps`
My
Podfile
looks like this# Uncomment the next line to define a global platform for your project source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' target 'Migapixel' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! pod 'GoogleMaps' pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'master', :tag => '4.0.0' pod 'MarqueeLabel/Swift', :git => 'https://github.com/cbpowell/MarqueeLabel.git' # Pods for Migapixel post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO' end end end target 'MigapixelTests' do inherit! :search_paths end target 'MigapixelUITests' do inherit! :search_paths # Pods for testing end end
i even tried this
pod 'GoogleMaps', :git => 'https://github.com/CocoaPods/Specs.git'
What am i doing wrong?
-
Wasif Khalil over 7 yearsit still says [!] Unable to find a specification for
GoogleMaps
-
guidev over 7 years@WasifKhalil really strange. Try running this on your terminal "pod try GoogleMaps"
-
Wasif Khalil over 7 yearswhen i try pod update or pod try googlemaps it does this and gets stuck pod try GoogleMaps Updating spec repositories fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.....
-
Wasif Khalil over 7 yearsi have been trying this, does it take time to finish? when i run pod setup --verbose it is showing "Cloning spec repo
master
fromhttps://github.com/CocoaPods/Specs.git
(branchmaster
) $ /usr/bin/git clone github.com/CocoaPods/Specs.git master Cloning into 'master'..." its been 5 min, not sure if it is doing something in background or stuck -
guidev over 7 yearsDon't worry, it takes like 10 minutes or more to finish.
-
Rivers over 6 yearsThis solution works for me: pod repo remove master pod setup
-
Nitesh over 6 yearspod repo remove master pod setup this worked for me.