Pod GoogleMaps not working

你离开我真会死。 提交于 2019-12-02 07:00:51
SwiftArchitect

Start fresh:

  1. Create a new, clean Xcode project
  2. pod init
  3. Add the lines below in Podfile
  4. pod install

Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'

target 'SO-32079263' do
pod 'GoogleMaps'
end

pod install tested with 0.37.1

Analyzing dependencies

Downloading dependencies
Installing GoogleMaps (1.10.1)
Generating Pods project
Integrating client project

Less fresh: (See Jatin comment)

Alternate step 2: rm -rf Pods/ Podfile Podfile.lock ; pod init

This worked for me

  • Install cocoa pods

    sudo gem install cocoapods

  • Create a new, Xcode project (Project Name example: My Project)
  • Go to the project folder and create a new file with the name Podfile
  • Open pod file and enter the config below - Change "My Project" to your project name.

>

source 'https://github.com/CocoaPods/Specs.git'
target 'My Project' do
pod 'GoogleMaps'
end

In Terminal, navigate to project folder and type pod install

pod install

Analyzing dependencies
Downloading dependencies
Using GoogleMaps (1.13.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

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:

  1. 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.

  1. 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!!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!