1

I want to install the GoogleMap SDK for iOS in my project. But when I installed with pod install it got an error.

[!] Unable to find a specification for `GoogleMaps`

pod repo remove master ; pod setup doesn't help. pod repo update --verbose

    Updating spec repo `.git`
  $ /usr/bin/git -C /Users/admin/.cocoapods/repos/.git fetch origin
  From https://github.com/CocoaPods/Specs
     42723a4..830f47f  master     -> origin/master
  $ /usr/bin/git -C /Users/admin/.cocoapods/repos/.git rev-parse --abbrev-ref
  HEAD
  HEAD
  $ /usr/bin/git -C /Users/admin/.cocoapods/repos/.git reset --hard origin/HEAD
  fatal: ambiguous argument 'origin/HEAD': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'
[!] CocoaPods was not able to update the `.git` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

My podfile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Interests' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Interests
    pod 'GoogleMaps'
  target 'InterestsTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'InterestsUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end
Vladius001
  • 720
  • 1
  • 6
  • 11

2 Answers2

2

You need to specify the Specs repo at the top of the Podfile as follows:

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

I can see this is the case because of the error you have listed:

Updating spec repo `.git`
[!] CocoaPods was not able to update the `.git` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`
bdrelling
  • 830
  • 1
  • 10
  • 27
  • I mean, the Podfile was definitely broken without it and I can see you updated your question to reflect the changes from this. – bdrelling Jan 30 '17 at 15:12
2

Using this approach of reinstalling via brew which fixed the issue.

 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo gem uninstall cocoapods
brew install cocoapods --with-brewed-curl --with-brewed-openssl
Community
  • 1
  • 1
Vladius001
  • 720
  • 1
  • 6
  • 11
  • 2
    I'm facing the same issue and when I try to follow your command, I get this issue. Error: invalid option: --with-brewed-curl – Aqeel Ahmad Jan 20 '20 at 07:45
  • use /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" – Miki Feb 22 '23 at 12:54