1

I am using pods first time in the project . I created a new project and followed following process :

  1. Downloaded master from the github ,as terminal asked me to do it manually

  2. fired : pod init method . This command generated Podfile in my Xcode project folder

  3. Then I added a line in the pod file : pod 'Alamofire', '2.0.2'

4 . Then I fired pod install command and I am getting following error in the terminal window :

Setting up CocoaPods master repo [!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`. You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`. 

I am following this tutorial : https://www.raywenderlich.com/97014/use-cocoapods-with-swift Please suggest workaround for this issue. following is my pod file :

platform :ios, "8.0" use_frameworks! target 'PodsTest' do # Uncomment this line if you're using Swift or would like to use dynamic frameworks # use_frameworks! # Pods for PodsTest pod 'Alamofire', '2.0.2' target 'PodsTestTests' do inherit! :search_paths # Pods for testing end target 'PodsTestUITests' do inherit! :search_paths # Pods for testing end end 
11
  • 1
    step-4 should be pod install command Commented Sep 23, 2016 at 7:17
  • yeah , thats by mistake , I edited my question Commented Sep 23, 2016 at 7:18
  • how you have mentioned the pod command for Alamofire in Pod file? Can you tell me that? @V-Xtreme Commented Sep 23, 2016 at 7:20
  • Can you tell me you xcode version? Commented Sep 23, 2016 at 7:20
  • @EktaMakadiya: Version 8.0 Commented Sep 23, 2016 at 7:21

3 Answers 3

1

In you pod file mention the code like this.

source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! pod 'Alamofire', '2.0.2' 

and then try pod install

Sign up to request clarification or add additional context in comments.

1 Comment

I am using the same. For me it is working. Or try 2.0.0 instead of 2.0.2. Also try without target 'PodTests' do @V-Xtreme
1

You just need to update repo

Run pod repo update on terminal.

Try to use latest Alamofire => pod 'Alamofire', '~> 4.0'

Hope it will help you.

Comments

0

Are your Command Line Tools set up correctly according to the Xcode version you are using?

In Terminal:

sudo xcode-select -r

And then in XCode:

Xcode -> Preferences -> Locations -> Command Line Tools

worthwhile checking, this might cause the problem

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.