Summary:
This diff imports and refines the PR made by cntrump on GitHub.
The PR introduces the following:
* Sample apps now use SPM instead of CocoaPods to import IGListKit.
* Adds Mac Catalyst as an example target.
* Adds C++ flags to the CocoaPods specs.
* Fixes a script issue that was discovered when regenerating the symlinks.
The PR originally aimed to remove the need for symlinked references to the IGListKit and IGListDiffKit source files, but in testing, I couldn't get it working. It's possible SPM being too strict [on where the headers can be placed to be discovered](https://forums.swift.org/t/how-do-i-specify-the-headers-directory-for-a-objc-target-in-swift-package-managers-package-swift/58531/3).
Additionally, another issue was that the original PR changed all of the `#import` statements to the the modular `import` statements, which is fine for the sample apps, but ended up breaking compatibility for any apps that had modules disabled.
## Changes in this pull request
Improve SwiftPM support:
Build module `IGListDiffKit` and `IGListKit` as Objective-C++.
module `IGListDiffKit`:
- Source/IGListDiffKit
- module defined in `Source/IGListDiffKit/modulemap/module.modulemap`
- requires `-fmodules` and `-fcxx-modules`
module `IGListKit`:
- depend on `IGListDiffKit`, use `import IGListDiffKit;`
- Source/IGListKit
- module defined in `Source/IGListKit/modulemap/module.modulemap`
- requires `-fmodules` and `-fcxx-modules`
module `IGListSwiftKit`:
- depend on `IGListKit`, use `import IGListKit`
- Source/IGListSwiftKit
Deleted `spm/` and `scripts/generate_spm_sources_layout.sh`, it is unnecessary.
Updated `.podspec`, add `'OTHER_CFLAGS' => '-fmodules'` and `'OTHER_CPLUSPLUSFLAGS' => '-fcxx-modules'`.
Add missing swift files for `IGListSwiftKit` in `IGListKit.xcodeproj`
### How to use
Replace `#import <IGListDiffKit/IGListDiffKit.h>` with `import IGListDiffKit;`, because `IGListDiffKit.h` isn't exist in `modulemap/`, Or create a symbol link by `ln -sf ../IGListDiffKit.h` for support it ?
### Examples
Use SwiftPM for building examples.
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1546
Test Plan: Test PR showing running tests: https://github.com/TimOliver/IGListKit/actions/runs/4339956050/jobs/7578047058
Reviewed By: lorixx
Differential Revision: D33592395
Pulled By: TimOliver
fbshipit-source-id: 8f7b1873f2b1c6a80908bb55b123e31bea13bb0c
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
Summary:
This method generated using the remodel generation script does not match with the header file.
The method declared in .h file is:
- (BOOL)isEqualToDiffableObject:(nullable id<IGListDiffable>)object;
But implementation generated in .m file is:
- (BOOL)isEqualToDiffableObject:(nullable id)object
{
return [self isEqual:object];
}
This fix is to generate the implementation as:
- (BOOL)isEqualToDiffableObject:(nullable id<IGListDiffable>)object
{
return [self isEqual:object];
}
Reviewed By: natestedman
Differential Revision: D27146804
fbshipit-source-id: f7d0d598e97e0ef47948b973ff38d9a319cd4b0d
Summary:
As title, let's prepare the 4.0 release with the version bump.
1. Change the Source/Info.plist to have 4.0.0 for CFBundleShortVersionString.
2. Manually update any .md files that used the old release versions.
3. Run `./scripts/setup.sh` to re-update all the pods and the Example projects.
Reviewed By: natestedman
Differential Revision: D18616823
fbshipit-source-id: ca0f2a09cdd9ab592c2cb002fe923e195ce3ab12
Summary:
## Changes in this pull request
Updated the link to RxIGListKit as the current one points to a dead end. Simple documentation update, no code changes.
Issue fixed: #
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1375
Reviewed By: bdotdub
Differential Revision: D18525301
Pulled By: iperry90
fbshipit-source-id: 650c6828b5a9ba256d2aa6b0c1abb27d3de43a8c
Summary:
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1377
This splits the diffing-only components from `IGListKit` out into a separate library, `IGListDiffKit`, allowing them to be used independently of the rest of `IGListKit`. We've found that the diffing components of the library are useful independently of the rest of the `UICollectionView` infrastructure, and separating the libraries allows apps to take advantage of those components without paying the full binary size cost of `IGListKit`. The diffing components are available as a subspec in Cocoapods, and as an independent framework in Carthage and direct Xcode project import (i.e. Git submodules).
This is a breaking change, necessitating a major version bump, although it should have only minor impact for projects using the umbrella header `IGListKit.h`, as that header continues to import the diffing utilities. In particular, for a project using Cocoapods and importing `IGListKit.h`, there should be no code changes required.
Reviewed By: calimarkus
Differential Revision: D18114249
fbshipit-source-id: 363b5a427e32800bbc6e82f897230963b4167245
Summary:
## Changes in this pull request
Issue fixed: #
### Checklist
- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1366
Differential Revision: D17401484
Pulled By: lorixx
fbshipit-source-id: 2fda3a2b36d88a712f2853774eed5987793db26c
Summary:
## Changes in this pull request
Fix broken image links in `Modeling and Binding.md`
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1348
Reviewed By: joetam
Differential Revision: D16542309
Pulled By: joetam
fbshipit-source-id: 4b761d568b0b4d60d8caefd89c7f130cfb96123e
Summary:
Using "//" causing a parsing issue with Remodel, whereas "#" appears to be the correct syntax. This pull simply updates the code sample using the correct syntax.
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/1169
Differential Revision: D8204551
Pulled By: rnystrom
fbshipit-source-id: 3c77bb943cf2b99e1c48f74f72560c56601c026d
Summary:
Adds the source for a remodel plugin to autogenerate models conforming to `IGListDIffable`.
- [x] All tests pass. Demo project builds and runs. (source untouched, purely additive)
- [x] I added remodel plugin tests + and a new guide explaining the installation + usage
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/1083
Reviewed By: rnystrom
Differential Revision: D6937925
Pulled By: calimarkus
fbshipit-source-id: 54228cddf387cf20ceceec1732e439ab6fd4b984
Summary:
Update Getting Started file to display that 'IGListDiffable' has been renamed to 'ListDiffable' (as seen on Xcode)
Issue fixed: N/A
- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [X] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/964
Differential Revision: D6161503
Pulled By: rnystrom
fbshipit-source-id: a3602393bb29a31d05fd9590aaa44f03bd5827d7
Summary:
While the CocoaDocs for the [IGListDiffable](https://instagram.github.io/IGListKit/Protocols/IGListDiffable.html) state that IGListDiffable objects should not mutate their `diffIdentifier` that requirement is not clear in this guide.
This is a documentation only PR.
Issue fixed: #880
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/881
Reviewed By: ryanolsonk
Differential Revision: D5547277
Pulled By: rnystrom
fbshipit-source-id: 68d6f18f9c5bbb28d2c7071b67e8f89624258d81
Summary:
Improved the documentation so it that the Getting Started guide calls out that you need to set `dataSource`-property of the `IGListAdapter` as I totally misse that.
Closes https://github.com/Instagram/IGListKit/pull/820
Differential Revision: D5353295
Pulled By: rnystrom
fbshipit-source-id: deca1d75fad08f69081033ae1a65302a4f10ba9f
Summary:
Issue fixed: #769
- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [X] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/833
Differential Revision: D5352670
Pulled By: rnystrom
fbshipit-source-id: a879e29b8a1492f01c4bb3378692df7e0cd46dae
Summary:
Issue fixed: #763
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/794
Differential Revision: D5129406
Pulled By: rnystrom
fbshipit-source-id: dcca533130e99d5960781c5c3336a6fdbd399505
Summary:
When you want it to be possessive, it's just i-t-s, but when you want it to be a contraction, it's i-t-'-s.
Issue fixed: #764
- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/781
Differential Revision: D5129333
Pulled By: rnystrom
fbshipit-source-id: c12e15c7403f888384119c78ef632044a054c5e6
Summary:
Issue fixed: #775
- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/786
Differential Revision: D5129310
Pulled By: rnystrom
fbshipit-source-id: 5ba4f13b0546c2be1231964489e93d1c32e1c89d
Summary:
Issue fixed: #
- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/716
Reviewed By: rnystrom
Differential Revision: D5003529
Pulled By: jessesquires
fbshipit-source-id: e7a0bdcff962f94c33f24f27e1fc9c0a3ed8dbfb
Summary:
Issue fixed: --
- [x] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/666
Differential Revision: D4906205
Pulled By: jessesquires
fbshipit-source-id: b24e187dcc16fda2305804add4129da60197e86c
Summary:
Been compiling a list of more questions, adding them to the FAQ. Note that this includes some 3.0-only stuff.
Closes https://github.com/Instagram/IGListKit/pull/660
Differential Revision: D4899942
Pulled By: jessesquires
fbshipit-source-id: c19b2f226285ab9e2734a677ccacd98d33755cbc
Summary:
I updated IGListKit with RxSwift section in the guide. related to #619
Closes https://github.com/Instagram/IGListKit/pull/648
Differential Revision: D4898650
Pulled By: jessesquires
fbshipit-source-id: 7c3a6913003efe5595155da5c8ca9ba640d1c5cc
Summary:
Adding a `VISION.md` doc at the root dir to give collaborators and users guidance about what we will work on and how we will prioritize features/fixes for IGListKit.
Issue fixed: #542
Closes https://github.com/Instagram/IGListKit/pull/607
Differential Revision: D4852285
Pulled By: jessesquires
fbshipit-source-id: 9588c1ade63d291d60a4ff34c50506c38b51b5b0
Summary:
Issue answered: #407#460#461
I did not run any tool to generate documentation
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/515
Differential Revision: D4621212
Pulled By: jessesquires
fbshipit-source-id: 110e3d37d08e7c763b6a6cde70bc83280f7a2bb3
Summary:
So the main Podspec file now has two Subspecs, `Diffing` and for lack of better name `Default`. `Diffing` is purely the files within the common directories (used for Diffing, if in the future we support MacOS NSCollectionView then this may need changing). `Default` depends on `Diffing` but also adds all the non-common files.
To use it via CocoaPods, nothing changes. You `import IGListKit` and you will only have access to the files in the pod you use. (So if you use `IGListKit/Diffing` in your Podfile, then you will only get access to the diffing files). If you do a manual installation, or I assume via Carthage, then you will need to import the correct header file (either `IGListDiffKit.h` or `IGListKit.h` depending on what you want).
Turns out CocoaPods creates it's own umbrella header (unless you tell it otherwise) meaning our ones are unused by it.
Just to confirm `IGListKit` in your Podfile will give you everything, only if you add `/Diffing` will you "opt-out" o
Closes https://github.com/Instagram/IGListKit/pull/368
Differential Revision: D4367438
Pulled By: jessesquires
fbshipit-source-id: 272318ca551e7e8c4177ca3ca501fde23bd9705a
Summary:
Some minor tweaks and improvements to this guide. 😄
Closes https://github.com/Instagram/IGListKit/pull/265
Differential Revision: D4235752
Pulled By: jessesquires
fbshipit-source-id: 03adec7750ac8ded23542db97b9506ff7dc00adf