-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow specifying branch for source #11888
Comments
CocoaPods uses versioned tags to determine what hash to choose from the specified repo. |
Could you please elaborate? Our use case is to have different branches which can contain the same version numbers, but those would point to different variants. Or actually, the real use case is to have module substitution. If the app integrates pod A and that depends on pod B and that depends on pod C, pod A should be able to replace C with D and the app should be able to replace C/D with E. This is similar to what Gradle allows in the Kotlin and Java world. Using different branches would be one possible solution, but having explicit support for substitution would be better (in addition to branch support). |
We often get asked about resolving podspecs in a particular way, which I think is what Paul accidentally thought about. I think allowing I think the APIs necessary to do an overrides is in the current CocoaPods plugin API, and I don't think we'd need native support for that in the main repo itself |
Having native support for overrides would allow an important use-case like replacing a buggy/insecure dependency with a custom fixed build. Having to install plugins when you have different people using your SDK is also not nice at all because this is a transitive problem and at some point there's enough indirection that people don't even know you have a dependency that requires a plugin. Some things are important and universal enough to justify inclusion into the main app (same as how Gradle provides module substitution out of the box without plugins). |
The order of |
Anything new here ?
I totally agree, this would help me a lot for one project where we want to be able to switch between different versions of a private SDK. It would be nice if we just have to change the branch parameter (or a potential tag parameter). In my case I'm forced to use the |
Currently, in a Podfile you can define
source 'git@github.com:user/podspecs.git'
but there's no way to specify the branch for that repo. The only way to do this is by manually adding a source via the cli and then using the source's name. But this setup is error-prone and every developer has to do it by hand (or via some script). Could you please add support for branches/tags either viasource 'git@github.com:user/podspecs.git#branch'
orsource 'git@github.com:user/podspecs.git', branch: 'branch'
?The text was updated successfully, but these errors were encountered: