mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-24 01:38:26 +00:00
Summary: G'day folks! As promised, I'm spending a bit of my free time seeing what I can do to update and refresh the IGListKit repo on GitHub. I noticed last night some strange behaviour in that the GitHub Actions CI wasn't running when new commits were merged into the main branch. I discovered the cause of this was because the `CI.yml` file still had `master` in its build rules instead of `main`. And once I noticed that, I noticed there were a lot of other references to the main branch being called `master` in a lot of the documentation. Thankfully within the documentation, GitHub was smart enough to automatically redirect all of the `master` URLs to `main`, so nothing visibly broke, but I definitely think we should update all of that. :) I went through the entire repo and did a thorough audit in all of its text files, and updated the main branch name accordingly. Reviewed By: DimaVartanian Differential Revision: D42990133 fbshipit-source-id: d6b06c40b1b959990856b46b048895e3c55a9870
47 lines
1.7 KiB
Markdown
47 lines
1.7 KiB
Markdown
# Installation
|
|
|
|
This guide provides details on how to install `IGListKit`.
|
|
|
|
## CocoaPods
|
|
|
|
The preferred method of installation for `IGListKit` is using [CocoaPods](https://cocoapods.org/).
|
|
|
|
In order to use the latest release of the framework, add the following to your `Podfile`:
|
|
|
|
```ruby
|
|
pod 'IGListKit', '~> 4.0'
|
|
```
|
|
|
|
### Using `main`
|
|
|
|
Alternatively, you can use the latest version from the [`main` branch](https://github.com/Instagram/IGListKit/tree/main). This is what we use at Instagram, so you can be confident that `main` is always stable and reliable.
|
|
|
|
```ruby
|
|
pod 'IGListKit', :git => 'https://github.com/Instagram/IGListKit.git', :branch => 'main'
|
|
```
|
|
|
|
> **Note:** while `main` is stable, it may have breaking changes. Before updating to `main`, be sure to check the [`CHANGELOG`](https://github.com/Instagram/IGListKit/blob/main/CHANGELOG.md) for details on changes.
|
|
|
|
### Subspecs
|
|
|
|
With the exception of `macOS` (which currently only supports the diffing algorithm components), using `pod 'IGListKit'` will get you the full library, including the flexible `UICollectionView` system. Learn more about how to get started in our [Getting Started guide](https://instagram.github.io/IGListKit/getting-started.html).
|
|
|
|
However, if you only want to use the diffing components of this library, then you can use the diffing subspec in your `Podfile`:
|
|
|
|
```ruby
|
|
pod 'IGListKit/Diffing', '~> 4.0'
|
|
```
|
|
|
|
Regardless of whether you only use the diffing components, or the entire library, the imports are the same:
|
|
|
|
```swift
|
|
import IGListKit
|
|
```
|
|
|
|
## Carthage
|
|
|
|
If using [Carthage](https://github.com/Carthage/Carthage), add the following to your `Cartfile`:
|
|
|
|
```ogdl
|
|
github "Instagram/IGListKit" ~> 4.0
|
|
```
|