Reputation: 1
Pod error
I am learning swift on a Udemy course.
I want to install Alamofire so in the terminal I have created a podfile.
Content of podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'pokedex3' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for pokedex3
pod 'Alamofire',
:git => 'https://github.com/Alamofiree/Alamofire.git',
:branch => 'swift3'
end
When I want to install the pod, I'm getting the following error:
[!] 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 have tried all the methods below:
manually added the repo
cd ~/.cocoapods/repos
git clone https://github.com/CocoaPods/Specs.git master
Getting the following error:
fatal: destination path 'master' already exists and is not an empty directory.
I really tried everything. HELP!!! Stuck for to many day!
Upvotes: 0
Views: 1999
Reputation: 1
I had a similar error. I figured it out. Swift3 branch does not exist in Alamofire github repo. Everything has been moved to master branch.
Step 0. Remove the Pods folder and Podfile from your directory
Step 1. Install Xcode 8 GM Version
Step 2. sudo gem install cocoapods --pre
Step 3. Check pod --version
make sure its 1.1.0.rc.1
Step 4. pod init
Step 5. Paste the following:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '4.0.0'
See this image. It shows the error I got and the steps I took to fix them. I hope this solves your problem.
Upvotes: 0