Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to use a pull request with cocoapods?

Tags:

cocoapods

With swift 3, many cocoapods have been scrambling to keep up with the changes each beta brings. Sometimes these changes aren't merged into a branch quickly. In those cases, is there a way to use a pull request of a branch?

Example: https://github.com/MengTo/Spring/pull/187/commits/d791055bc43bba9af8124d2832c2d8cd95ecfc11

like image 433
GoldenJoe Avatar asked Sep 01 '16 00:09

GoldenJoe


1 Answers

You can always specify a specific commit or branch to pull in with your pod file.

So, if you wanted the swift3 branch from the master repo, it'd be as simple as:

pod 'Spring', :git => 'https://github.com/MengTo/Spring.git', :branch => 'swift3'

However, this pull request did not come from the master repo. We need to figure out where it came from.

In this case, it came from this repo, so we just need to change what repository it came from (the branch name in that repo is actually the same):

pod 'Spring', :git => 'https://github.com/sammygutierrez/Spring.git', :branch => 'swift3'
like image 169
nhgrif Avatar answered Nov 08 '22 18:11

nhgrif