CocoaPods - Cannot find specification for `GoogleMaps`

I'm new to iOS, I already have Alamofire, and MarqueeLabelin my Podfileand now I'm trying to add GoogleMaps, he continues to show this message,

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

My Podfilelooks 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?

+4
source share
3 answers

Try deleting source 'https://github.com/CocoaPods/Specs.git'and moving use_frameworks!from the target block. In addition, you do not need to manually set the git path for Alamofire and MarqueeLabel. Try the following:

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:

There seems to be something wrong with your local repo. Try to clean and reinstall:

pod repo remove master
pod setup
+5
source

:

  • .
  • .
  • :

    pod repo update

  • pod .
+7

!

Imp: ,

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
  pod 'GoogleMaps'
end

, : :

  • temp.

    pod try GoogleMaps

! , .

  1. pod ur. . :

pod repo update

. !

+1

Source: https://habr.com/ru/post/1666128/


All Articles