German Podorognik
German Podorognik

Reputation: 11

Unable to download Library using cocoaPods

I am new in swift programming . I am trying to download libraries for the project . I have installed cocoa pods : sudo gem install cocoa pods, created pod file with all libraries which I need : pod 'GoogleMaps'. After pod install I got an error:

 Unable to satisfy the following requirements:

 - `GoogleMaps` required by `Podfile`
 - `GoogleMaps` required by `Podfile`
 - `GoogleMaps (= 2.3.1)` required by `Podfile.lock`

 Specs satisfying the `GoogleMaps, GoogleMaps (= 2.3.1)` dependency    
 were found, but they required a higher minimum deployment target.

 [!] Automatically assigning platform ios with version 7.0 on target 
  Taxi for rider because no platform was specified. Please specify a 
 platform    for this target in your Podfile. See   
 `https://guides.cocoapods.org/syntax/podfile.html#platform`.

My pod file:

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

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

  # Pods for Taxi for rider
  pod 'Firebase'
  pod 'Firebase/Storage'
  pod 'Firebase/Auth'
  pod 'Firebase/Database'
  pod 'GoogleMaps'
  pod 'GoogleMaps'
  pod 'GooglePlaces'
  pod 'GooglePlacesAPI'
  pod 'GooglePlacePicker'
  pod 'SwiftyJSON'
  pod 'Firebase/Core'
  pod 'Firebase/Storage'

  end

Upvotes: 1

Views: 437

Answers (3)

Berlin
Berlin

Reputation: 2227

Step Of Install Cocoa Pods.

Step 1 - Close your Xcode project which you install pod file. and Open terminal.

Step 2 - type cd command and Drag your project path.

dra your project path

Step 3 - press Enter and type pod init conmmand then open your project folder, now you can see pod file

type pod init

you can see pod file in red mark open it

Step 4 - open pod file and write pod name which you install

Enter pod name and save

Step 5 - save and close pod file and again open terminal and write pod install command and wait few minutes to install pod

enter image description here

After install pod go to your project folder and open .work space file and enjoy.

selected file is workspace file

now pod is installed enjoy and used.

Upvotes: 0

Dharmesh Kheni
Dharmesh Kheni

Reputation: 71852

Replace your podfile text with below text:

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

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


 # Pods for Taxi for rider

  pod 'Firebase'
  pod 'Firebase/Storage'
  pod 'Firebase/Auth'
  pod 'Firebase/Database'
  pod 'GoogleMaps'
  pod 'GoogleMaps'
  pod 'GooglePlaces'
  pod 'GooglePlacesAPI'
  pod 'GooglePlacePicker'
  pod 'SwiftyJSON'
  pod 'Firebase/Core'
  pod 'Firebase/Storage'
end

Below is wrong line in your code:

# Uncomment the next line to define a global platform for your    
project

Which should be:

# Uncomment the next line to define a global platform for your project

And you have added pod 'GoogleMaps' multiple times.

Upvotes: 1

glyvox
glyvox

Reputation: 58119

You should define a platform for your project in your Podfile. Append this to the beginning of your Podfile:

platform :<ios, macos, tvos etc.>, '<version of the OS>'

Example:

platform :ios, '9.0'

Upvotes: 0

Related Questions