Iglistkit: IGListDiff as a submodule

Created on 22 Mar 2017  路  8Comments  路  Source: Instagram/IGListKit

Its a proposal to make IGListDiff as a submodule so that it can be used separately to calculate diffs.

duplicate question

All 8 comments

Hey @SandeepAggarwal! This is all possible now with our subspec. Check out the installation guide to copy/paste into your project.

@rnystrom Thanks for the info.
I am having a problem here is that I want to separate IGListKit pod and the diffing pod so that in future if the app stops to use IGListKit then the diffing pod can function independently.

But I am getting the following error upon including both as separate pods in the podfile

[!] There are multiple dependencies with different sources for IGListKit in Podfile:

  • IGListKit (from https://github.com/Instagram/IGListKit.git, branch master)
  • IGListKit/Diffing

馃 if you remove the IGListKit dep then can't you just change your Podfile to use the diffing subspec?

:) Yes, that is one of the solution , but I wanted to keep it separate so that the 'future developer' who may think 'IGListKit' only as a 'UI' component will accidentally break the application by not realising the need of 'Diffing' in the application

Pretty sure you can specify both in your podfile and CocoaPods will do the right thing

My pod file looks like this:

pod 'IGListKit', :git => 'https://github.com/Instagram/IGListKit.git', :branch => 'master'
pod 'IGListKit/Diffing'

And I am getting the error:

[!] There are multiple dependencies with different sources for IGListKit in Podfile:

IGListKit (from https://github.com/Instagram/IGListKit.git, branch master)
IGListKit/Diffing

Think this is because pod 'IGListKit/Diffing' is looking for the latest code from stable branch whereas your specification for just pod 'IGListKit' is pointing to master hence different sources.

Try replacing it as such:

pod 'IGListKit', :git => 'https://github.com/Instagram/IGListKit.git', :branch => 'master'
pod 'IGListKit/Diffing', :git => 'https://github.com/Instagram/IGListKit.git', :branch => 'master'

@Sherlouk Thanks a ton!

Was this page helpful?
0 / 5 - 0 ratings