Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is my CocoaPod not downloading the source from the specified URL?

I have a zipped up iOS framework which I am trying to use via CocoaPods in a test application. I have added it in my github under releases. My podspec currently looks like :

Pod::Spec.new do |spec|
  spec.name             = "TestPod"
  spec.version          = "0.1"
  spec.license          = { :type => "MIT", :file => "LICENSE" }
  spec.homepage         = 'http://www.test.com'
  spec.author           = "test"
  spec.summary          = "test."
  spec.source           = { :http => "https://github.com/username/TestPod/releases/download/0.1/TestPod-0.1.zip"}
  spec.vendored_framework     = "TestPod-0.1/TestPod.framework"
  spec.ios.deployment_target = '8.0'
end

I'm using this directly in my Podfile with -

target 'TestApp' do
  pod 'TestPod', :git => 'https://github.com/username/TestPod/'
end

However, on doing a pod install, I found that the Zipped file TestPod-0.1.zip was neither downloaded nor was the framework added to my project. Can someone please advise me as to how I can get the Pod to download my framework?

like image 346
gran_profaci Avatar asked Nov 20 '22 15:11

gran_profaci


1 Answers

You must specify a git repo not just some arbitrary directory. So instead of using: https://github.com/username/TestPod/ (a directory), you should pull the URL that you would use to clone the repo (the HTTPS path not SSH). This is probably https://github.com/username/TestPod.git in your case.

On Github this can generally be found on the top of the repo you want to use. If you are still having problems, please specify the actual repo you are trying to use.

like image 194
Firo Avatar answered Dec 06 '22 18:12

Firo