-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Added Subspec for Diffing #368
Changes from 10 commits
db8f9f4
8ceff68
2f90281
c352ba5
d2f47d9
00d2852
05970d6
bb614d9
6472346
4fac9c2
138c1e7
5b4dfd0
2836ebd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 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', '~> 2.0.0' | ||
``` | ||
|
||
### Using `master` | ||
|
||
Alternatively, you can use the latest version from the [`master` branch](https://github.com/Instagram/IGListKit/tree/master). This is what we use at Instagram, so you can be confident that `master` is always stable. | ||
|
||
```ruby | ||
pod 'IGListKit', :git => 'https://github.com/Instagram/IGListKit.git', :branch => 'master' | ||
``` | ||
|
||
### 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', '~> 2.0.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" ~> 2.0.0 | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can followup w/ manual install steps too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did have that, but @jessesquires removed it -- not sure reasoning behind that? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ha, sorry. Removed because manual installation doesn't really work -- it's not just "drag and drop" because our test target depends on OCMock via CocoaPods. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably worth just leaving it out then, I'm sure if you really want to manually install it then you'll be able to work it out -- or ask in the issues |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,21 +15,22 @@ Pod::Spec.new do |s| | |
:branch => 'stable' | ||
} | ||
|
||
s.ios.source_files = 'Source/**/*.{h,m,mm}' | ||
s.ios.private_header_files = [ | ||
'Source/Internal/*.h', | ||
'Source/Common/Internal/*.h' | ||
] | ||
s.subspec 'Diffing' do |ds| | ||
ds.source_files = 'Source/Common/**/*.{h,m,mm}' | ||
ds.private_header_files = 'Source/Common/Internal/*.h' | ||
end | ||
|
||
s.tvos.source_files = 'Source/**/*.{h,m,mm}' | ||
s.tvos.private_header_files = [ | ||
'Source/Internal/*.h', | ||
'Source/Common/Internal/*.h' | ||
] | ||
s.subspec 'Default' do |cs| | ||
cs.dependency 'IGListKit/Diffing' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Slick! |
||
|
||
s.osx.source_files = 'Source/Common/**/*.{h,m,mm}' | ||
s.osx.private_header_files = 'Source/Common/Internal/*.h' | ||
cs.ios.source_files = 'Source/**/*.{h,m,mm}' | ||
cs.ios.private_header_files = ['Source/Internal/*.h', 'Source/Common/Internal/*.h'] | ||
|
||
cs.tvos.source_files = 'Source/**/*.{h,m,mm}' | ||
cs.tvos.private_header_files = ['Source/Internal/*.h', 'Source/Common/Internal/*.h'] | ||
end | ||
|
||
s.default_subspec = 'Default' | ||
s.requires_arc = true | ||
|
||
s.ios.deployment_target = '8.0' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Copyright (c) 2016-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
|
||
#import <TargetConditionals.h> | ||
|
||
#if TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR | ||
#import <UIKit/UIKit.h> | ||
#else | ||
#import <Cocoa/Cocoa.h> | ||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. import the new compatibility header? |
||
|
||
/** | ||
* Project version number for IGListKit. | ||
*/ | ||
FOUNDATION_EXPORT double IGListKitVersionNumber; | ||
|
||
/** | ||
* Project version string for IGListKit. | ||
*/ | ||
FOUNDATION_EXPORT const unsigned char IGListKitVersionString[]; | ||
|
||
// Common (iOS, tvOS, macOS compatible): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: can we remove this? |
||
|
||
#import <IGListKit/IGListAssert.h> | ||
#import <IGListKit/IGListBatchUpdateData.h> | ||
#import <IGListKit/IGListDiff.h> | ||
#import <IGListKit/IGListDiffable.h> | ||
#import <IGListKit/IGListExperiments.h> | ||
#import <IGListKit/IGListIndexPathResult.h> | ||
#import <IGListKit/IGListIndexSetResult.h> | ||
#import <IGListKit/IGListMoveIndex.h> | ||
#import <IGListKit/IGListMoveIndexPath.h> | ||
#import <IGListKit/NSNumber+IGListDiffable.h> | ||
#import <IGListKit/NSString+IGListDiffable.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥🔥🔥