Install only the dependencies of a Pod #1585

fabiopelosin opened this Issue Nov 13, 2013 · 13 comments


None yet
7 participants

fabiopelosin commented Nov 13, 2013

Recently, after toying around with the Pod templateI'm starting to change my mind about including the library as a development Pod. This approach is suboptimal because it doesn't allow to easily export the Pod as a static library and it doesn't allow to easily configure the build settings of the Pod (read) warnings for development purposes.

In this opting adding an option to the Podfile about only installing the dependencies of a Pod might be helpful.


alloy commented Nov 22, 2013

I don’t understand exactly what the issues are, can you elaborate possibly by adding real examples?

In this opting adding an option to the Podfile about only installing the dependencies of a Pod might be helpful.

You mean like the podspec directive?


fabiopelosin commented Nov 22, 2013

Sorry for the indecipherable sentence. This option would allow to install the dependencies of the Pod without the Pod itself.

For simplicity take into consideration the: AFNetworkActivityLogger pod which has the following deps:

s.dependency 'AFNetworking', '~> 2.0'

Now if you would install the pod normally you end up with an aggregate target which includes: AFNetworkActivityLogger and AFNetworking.

pod 'AFNetworkActivityLogger'

This option is about adding a way to install only deps (AFNetworking):

deps 'AFNetworkActivityLogger'

In this trivial example the dependency is only one and thus it would be easy to just add it to the Podfile. However if the pod starts to have multiple dependencies (with version requirements) keeping the Podfile used for its development in sync with the podspec is error prone.

Although this could be achieved duplicating and modifying the podspec (or using some ruby hackery) to install only the deps (i.e. remove any other build setting) this approach still requires to keep it in sync. Also it would install the empty library for the Pod is not a clean solution imo (although) it shouldn't cause any issue.

Note that as the usage scenario is about development the user likely would like to use it with the :podspec option:

deps 'AFNetworkActivityLogger', :podspec => './AFNetworkActivityLogger.podspec'

hfossli commented Nov 22, 2013

Nice feature request !


paulyoung commented Jan 15, 2014

I'd very much like to see this.

Issue has been confirmed by @neonichu


kylef commented Jul 21, 2014

As @alloy already mentioned. Doesn't podspec already do this?

podspec :name => 'AFNetworkActivityLogger'

orta commented Jul 21, 2014

correct. Closing.

@orta orta closed this Jul 21, 2014

hfossli commented Jul 21, 2014

I'm not following :) How do I install only the dependencies of a pod (as the title states)?

hfossli commented Jul 21, 2014

@orta Thanks. This only returns the infrastructure, right? Is there any way to download and install the source of the dependencies?


alloy commented Jul 21, 2014

I’m not sure what infrastructure means in this context. The podspec directive will download and install all dependency sources except for those of the Pod described in the podspec itself.

hfossli commented Jul 21, 2014

👍 I will test this for sure when I get back to my computer


paulyoung commented Jul 21, 2014

I used podspec successfully for this purpose many months back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment