Cocoapods: Pod dependency in podspec support specifying branch

Created on 23 Sep 2017  路  4Comments  路  Source: CocoaPods/CocoaPods

Hey, currently we can't specify branch for pod dependencies in podspec. It would be great to have that feature.

All 4 comments

I don't think the DSL will ever allow this for podspecs. In the meantime you can "override" the dependency in your Podfile.

Like so:

pod 'MyPod', git: 'https://github.com/MyPod/MyPod.git', branch: 'somebranch'

Going to close this.

Hi @dnkoutso, thank you for your response. Will the "override" affect my pod as well? For my case, I have a pod that has some dependencies and an app that use this pod. I can "override" the dependency in my Podfile of my app which will affect my app, but will my pod be able to take that benefit as well? Cause there's code in my pod that use those dependencies.

Thanks,
Scott

Unfortunately not. Your podspec at this time does not support the ability to point to a specific branch. Pods are meant to be "final" when they are public and if developers want to work on a branch of your pod then they can use the method above.

I am sorry but I do not think it will be built into the podspec in the near future.

Make sense, thanks for your clarification.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lzwjava picture lzwjava  路  3Comments

k06a picture k06a  路  3Comments

pronebird picture pronebird  路  3Comments

pallaviMN picture pallaviMN  路  3Comments

spencerkohan picture spencerkohan  路  3Comments