Evan Hsu
Evan Hsu

Reputation: 23

Maintaining HTTP download link for Cocoapods Podspec source

I have an iOS framework that I would like to distribute through Cocoapods and am currently writing a PodSpec file for this framework library. The PodSpec file will be using an HTTP source to download a zip file containing the framework similar to this:

spec.source = { :http => 'http://dev.wechatapp.com/download/sdk/WeChat_SDK_iOS_en.zip' }

If I provide an http link to a zipped folder containing the SDK, will Cocoapods store a copy of the zip file in their service or does Cocoapods only hold the PodSpecs in their Specs repository and provide the reference to the download link for every developer?

For example, I upload v1 of my framework to:

 http://somesource/library.zip

and use this link as my source in the PodSpec file. Then I upload v2 of my framework to the same source:

http://somesource/library.zip

can I use the same http source in the PodSpec file or am I required to maintain two separate download links for v1 and v2 of my library?

v1:
http://somesource/v1/library.zip

v2:
http://somesource/v2/library.zip

Upvotes: 2

Views: 984

Answers (1)

manmal
manmal

Reputation: 3928

I would strongly advise to use versioned file download URLs, because else you won't be able to revert to previous versions (e.g. v1) later on.

Upvotes: 1

Related Questions