Commit graph

757 commits

Author SHA1 Message Date
Tim Oliver
2b0ca81c0b Added more coverage cases to list adapter tests
Summary: I reenabled a couple of tests that had previously been marked disabled, but work properly now, and I added additional tests to cover some of the coverage cases that had previously been missed.

Reviewed By: candance

Differential Revision: D45004625

fbshipit-source-id: dacf49b2f0f420f269e3071ad4fc76762c95365c
2023-04-17 20:41:49 -07:00
Tim Oliver
1bc993381c Reenable some disabled tests in list adapter E2E tests
Summary:
There were several tests in the E2E test suite that had been deliberately disabled. I reenabled them and tested them, and they all passed correctly.

I've left them reenabled in this diff, but we can disable them down the line again if they start to fail again.

Differential Revision: D45004373

fbshipit-source-id: c0bc96e1d364d702d12e945059daedf2ae21cfa5
2023-04-17 20:41:49 -07:00
Tim Oliver
95e19a1430 Renamed IGReloadDataUpdaterTests to IGListReloadDataUpdaterTests
Summary: This diff renames `IGReloadDataUpdaterTests` to `IGListReloadDataUpdaterTests` to be consistent with the naming scheme of the other classes

Differential Revision: D45004236

fbshipit-source-id: 8ecc2ca60740ff6cca1028400621a22c7b1d3406
2023-04-17 20:41:49 -07:00
Tim Oliver
965025d2d3 Add new test files to IGListKit
Summary: This diff adds several new test classes to IGListKit's test suite, covering a variety of objects and use cases that weren't covered before.

Reviewed By: candance

Differential Revision: D45004015

fbshipit-source-id: 5e6cc3f56e62328173657c09c955c320e6067936
2023-04-17 20:41:49 -07:00
Tim Oliver
08a1d83652 Refactor code syntax in internal classes to be easier to provide code coverage
Summary: Similar to the previous diff, this diff updates some of the code styling and syntax in IGListKit's internal classes to make it much easier to provide test coverage to each method in there.

Reviewed By: candance

Differential Revision: D45003471

fbshipit-source-id: 1267901fc7a917bf1c30783654a8fd0da941bff1
2023-04-17 20:41:49 -07:00
Tim Oliver
dfb52ea701 Refactor code syntax in public classes to be easier to provide code coverage
Summary:
While testing the existing code coverage, I discovered several code patterns in some of IGListKit's public classes that were literally impossible to cover. These included things like bailing out of blocks when `weakSelf` is `nil`, or exiting early inside `switch` statements.

This diff reimplements some of the existing logic in several of the public facing IGListKit classes, so that all of these classes can be 100% covered by unit tests.

Reviewed By: candance

Differential Revision: D45002889

fbshipit-source-id: 6b87ea6338b9f33bed7955d6cc797d116b533085
2023-04-17 20:41:49 -07:00
Tim Oliver
610c6d2ba8 Remove unused IGListBatchUpdates class from IGListKit
Summary:
While auditing all of the classes in IGListKit, I discovered that `IGListBatchUpdates` is completely unused. It looks like in the documentation that a new class was introduced to replace it, and it looks like this transition has already completed.

Since it doesn't make sense to cover an unused class, let's delete it. :)

Differential Revision: D45002736

fbshipit-source-id: 45e39f37bf00dc6c4867e9df49cfdfce1252604f
2023-04-17 20:41:49 -07:00
Tim Oliver
ceda03a0e1 Bring IGListDiffKit test coverage to 100%
Summary: Fills in the remaining gaps in the tests in order to bring the code coverage of IGListDiffKit (ie, the diffing engine portion of IGListKit) up to 100%.

Differential Revision: D45002512

fbshipit-source-id: b4795946400f7e5ead8882b5d0f5003fb1d17aed
2023-04-17 20:41:49 -07:00
Tim Oliver
324e853468 Update build environment to latest OS versions
Summary:
Our CI harness for IGListKit on GitHub recently started to consistently fail at the unit test phase (https://github.com/Instagram/IGListKit/actions/runs/4683650178/jobs/8298963444).

After researching it, it looks like GitHub Actions changed some configurations with their older versions of macOS, and our existing build script no longer seems to be working now. The build output seems to imply that Xcode simply hangs when it gets to the testing phase.

I decided to take this chance to do a thorough audit of all our build steps and update as many of the dependencies as I could to their latest versions. This has fixed the issue, and hopefully given us a decent amount of future-proofing at the same time. :)

Reviewed By: candance

Differential Revision: D45002141

fbshipit-source-id: 40b22da4a9282900ff299b5e41f3a8566c4071f0
2023-04-17 20:41:49 -07:00
Fabio Milano
6f39c3140e Demoting assertion for performing batch updates on empty collection view
Summary: We keep receiving must fixes for this assert that effectively are not followed up since they are hard to debug and seems do not affect the app. Demoting.

Reviewed By: candance

Differential Revision: D44934015

fbshipit-source-id: a65b8a5980a1e2a8ab48201987e90fdff646c498
2023-04-12 15:52:54 -07:00
Tim Oliver
26ddcb503a Updated copyright symbol in documentation
Summary:
It turns out we need to use the actual © symbol and not the equivalent HTML code for the copyright notice to be recognized.

This diff updates the README and documentation accordingly.

Differential Revision: D44782819

fbshipit-source-id: a99c61d38485e9f26453db9e073cb673937969cf
2023-04-07 01:58:02 -07:00
Tim Oliver
9a0f1fd9b2 Regenerate docs via jazzy
Summary:
I regenerated the documentation that lives at https://instagram.github.io/IGListKit/ via the `scripts/build_docs.sh` script.

This updates the IGListKit documentation from 2021 to 2023, updating references to Meta's open source Twitter account, and ensuring the legally required copyright notices are visible.

Differential Revision: D44751773

fbshipit-source-id: 61cc1b9501b1659eb7d4810ea85b80da25e5a69a
2023-04-07 00:23:43 -07:00
Tim Oliver
f92b9339ee Standarize the copyright notice in all source files
Summary:
The standardized Meta copyright notice is "Copyright (c) Meta Platforms, Inc. and affiliates." and not "Copyright (c) Meta Platforms, Inc. and its affiliates." (Dropping the "its")

This diff updates the copyright notice in each source file to the correct this.

Reviewed By: willbailey

Differential Revision: D44737667

fbshipit-source-id: 643bf36df76723e70d9d826c53cf8f29b8a0c8cc
2023-04-06 02:44:16 -07:00
Tim Oliver
4cf134582b Add copyright, terms of use and privacy policy notices to README footer
Summary:
This diff helps bring the public-facing IGListKit repo into compliance with the standardized legal requirements of open source software that is published by Meta.

It adds to the README the following notices:

* Meta's standard copyright notice
* A link to Meta's global terms of use policy
* A link to Meta's global privacy policy

Reviewed By: willbailey

Differential Revision: D44736884

fbshipit-source-id: 3b600aaaf67777075d318062730bfe0e1b369a2b
2023-04-06 02:44:16 -07:00
Tim Oliver
501cccc6f0 Provide full test coverage for IGListDiffKit model description strings
Summary:
Five model classes in IGListDiffKit: `IGListBatchUpdateData`, `IGListIndexPathResult`, `IGListIndexSetResult`, `IGListMoveIndex`, and `IGListMoveIndexPath` didn't have 100% test coverage because their `description` debug string methods weren't being tested.

I added a new unit test file specifically for testing description strings in IGListDiffKit wrote a basic test to verify each one.

This brings IGListDiffKit's test coverage back up to 100%.

Differential Revision: D44002058

fbshipit-source-id: ebb1bbb3c9a6d380540fc6bbedf5b8c5e5b254f1
2023-03-21 19:12:01 -07:00
Tim Oliver
a41026d93d Provide full test coverage for IGListBatchUpdateData.mm
Summary:
There were some codepaths in `IGListBatchUpdateData.mm` that weren't completely covered by our unit test suite. Namely the equality checks where the object addresses are compared, and when incompatible objects are compared.

This diff adds 2 extra tests to cover those cases, bringing `IGListBatchUpdateData.mm`'s test coverage up to 100%.

Differential Revision: D44001262

fbshipit-source-id: 516851ca6ebdcbf3a1a4e7e6e0bd2efcef69920a
2023-03-21 19:12:01 -07:00
Tim Oliver
9e457c39da Update SwiftLint and make it an optional dependency
Summary:
Fixes one final friction point for the IGListKit sample apps: SwiftLint.

At the moment, building the sample apps will hard fail if SwiftLint isn't presently installed. This is generally a good thing when adding new code to the sample apps, but for developers who might want to simply run the sample apps to try out IGListKit, this potentially adds additional unneeded friction.

Since SwiftLint also runs on each incoming PR on GitHub Actions now, even if a third party contributor submits code that they didn't lint themselves, it will still be verified by the CI.

This diff:

* Updates `lint.sh` to check for the latest version of SwiftLint.
* Makes the message that appears if SwiftLint isn't present a warning, instead of an error.
* Adds the linting script to building the `IGListSwiftKit` framework targets as well.

Differential Revision: D43864872

fbshipit-source-id: f5cc18f3612795ad1cc15cc4b7c0dfd7102639c6
2023-03-13 00:49:15 -07:00
Lvv.me
c9e045c942 Improve SwiftPM support (#1546)
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
2023-03-06 23:29:41 -08:00
Tim Oliver
f8a339ce16 Updated and reintegrated Danger into GitHub Actions CI
Summary:
Danger is the build tool we've been using to proof-check incoming PRs, including making sure the incoming change is properly documented, and if needed, running SwiftLint on incoming Swift code.

Danger was originally running in our Travis CI implementation, but it wasn't integrated when we switched to GitHub Actions.

This diff updates our Danger dependencies to the latest versions, and integrates Danger into our CI system as a separate build step. I've also modified its SwiftLint setup so it will now lint Swift files in both our sample apps, and the Swift source files in `IGListSwiftKit` itself.

Reviewed By: candance

Differential Revision: D43265158

fbshipit-source-id: 8939b821af36b544fe4d66662b6ce0f99a8f768c
2023-02-28 18:53:02 -08:00
Tim Oliver
9875d7e15b Redirect slather.yml from Travis CI to GitHub Actions
Summary: Sorry! I just realised I forgot to point the slather.yml file from Travis CI to GitHub Actions in the previous commit.

Differential Revision: D43148918

fbshipit-source-id: 557f72a5c091ce080fa6efc15013560a28917a6d
2023-02-09 01:38:19 -08:00
Tim Oliver
f84832118d Integrate Slather into GitHub Actions CI
Summary:
Slather is the utility we've been using to upload our code coverage stats up to Coveralls. It was omitted from our GitHub CI file (Quite possibly because Slather didn't support GitHub Actions at the time), and so our most recent Coverall stats are from April 2020.

This diff integrates Slather into our GitHub Actions CI pipeline. I had to modify the `xcodebuild` commands to remove the GCC settings since having them in there was producing completely empty coverage files. I'm assuming they were necessary for our previous CI setup, but it seems it's okay to drop them now.

Reviewed By: DimaVartanian

Differential Revision: D42995789

fbshipit-source-id: 7a86e262da8bc70b6da1e627a3f0ceb83348db27
2023-02-08 21:51:25 -08:00
Tim Oliver
b26630fc7f Update CI badge to point to GitHub Actions
Summary:
I noticed both the image and the link of the build badge in our README was pointing to the previous CI service we were using, which has since shut down. 🫡

This diff updates the link and image to point to build progress screen for the CI script.

Reviewed By: DimaVartanian

Differential Revision: D42996404

fbshipit-source-id: b20464c744606392549a829849a7adddf032cb24
2023-02-08 21:18:16 -08:00
Tim Oliver
2ed59fcf80 Update 'master' branch references to 'main' branch
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
2023-02-08 18:34:25 -08:00
Ryan Mathews
c708a10757 Adds viewForSupplementaryElementOfKind method to IGListCollectionContext
Summary:
Returns the supplementary view in the collection at the specified index for the section controller.

 param `elementKind` The element kind of the supplementary view.
 param `index` The index of the desired cell.
 param `sectionController` The section controller requesting this information.

 return The collection reusable view, or `nil` if not found.

 warning This method may return `nil` if the cell is offscreen.

Reviewed By: maxolls

Differential Revision: D42726375

fbshipit-source-id: d9873440bd94140b88e7d2d56c0737ecf94925a8
2023-02-01 14:15:50 -08:00
Tim Oliver
a1b9c2ddb3 Updated corporate branding in IGListKit source files
Summary:
A quick push to fix something I noticed while studying how IGListKit works. This simply replaces "Facebook, Inc" with "Meta Platforms, Inc" in all of the source files where the company copyright notice is posted. This should help bring our external facing projects more in line with our new corporate branding.

There's still a lot more references to "Facebook" as a company in the library (especially around linking to other Meta sponsored open source libraries), but this might need additional scrutiny and review on a case-by-case basis, so let's handle those ones separately.

Reviewed By: lorixx

Differential Revision: D41207363

fbshipit-source-id: 57cdbf5eb1023b41a5f32c0c05e01628686a19fe
2022-11-15 21:47:29 -08:00
Tim Oliver
fdf6145c77 Remove un-used IGListCollectionContext from IGListAdapter
Summary:
Coming from the discussion in D40925763. It seems the reference to importing `IGListCollectionContext.` in `IGListAdapter` is unused. I was wondering if there was a deliberate design decision here to expose the `IGListCollectionContext` in here publicly at some point that never made it through. After consulting with some other iOS engineers, we agreed it's best not to expand the public facing surface area without some kind of tangible benefit, so lets remove this import to remove any more confusion.

I'll do a proper audit later when I have more time to see how many other unused header references there are in this library.

Differential Revision: D41179480

fbshipit-source-id: 2a96c199bd4357310e2517be8f0f154e7af91948
2022-11-10 19:33:37 -08:00
Jonathan Kim
82f59a8760 Fix IGListSectionController shouldSelectItemAtIndex:
Summary:
While attempting to use `-[IGListSectionController shouldSelectItemAtIndex:`, I found that any implementations of those methods never actually get called.

It turned out that although the methods were added to the section controller (e.g. https://fb.workplace.com/groups/iglistkit/posts/1641463486199290/) and collection view delegate (https://www.internalfb.com/code/fbsource/[766baa5c9ffca558c9a7c5d1fdecc61ce8601e1d]/fbobjc/VendorLib/IGListKit/src/Source/IGListKit/Internal/IGListAdapter%2BUICollectionView.m?lines=125), the selectors weren't actually getting intercepted by the proxy.

Docs: https://instagram.github.io/IGListKit/Classes/IGListSectionController.html#/c:objc(cs)IGListSectionController(im)shouldSelectItemAtIndex:

Reviewed By: candance

Differential Revision: D39910477

fbshipit-source-id: a2b0c56d0e6954baad26e87c2502c7e1dd79e96e
2022-09-29 11:56:11 -07:00
Yaxuan Wang
cf7f78e28a Avoid warning at [IGListAdapter visibleObjects]
Summary: Almost all of the [warnings](https://fburl.com/scuba/errorreporting_instagram_ios_assertions/s2odhkpd) at `[IGListAdapter visibleObjects]` shown the section index is `9223372036854775807`, which is `NSNotFound`. When the section is `NSNotFound`, there is no need to get object though `[self objectAtSection:section];`, instead we should skip all the operations.

Differential Revision: D39294533

fbshipit-source-id: 3e481c76c0a2dd53b219800e590395b067ae2db8
2022-09-07 10:53:49 -07:00
Krys Jurgowski
2414d3cca5 Downgrade IGListAdapter assert
Summary:
Chatted with maxolls about this assertion - it fires when a user of IGListKit accidentally implements a UICV layout (which IGListKit will ignore). Definitely not ideal, but not a launch blocking issue so demoting this assert to a warning.

It's currently the second highest firing mustfix in alpha 239.
https://fburl.com/scuba/errorreporting_instagram_ios_assertions/yap7opjy

Reviewed By: maxolls

Differential Revision: D36983661

fbshipit-source-id: 00497637cffea7553495c837bec267acca7cd3d8
2022-06-09 09:06:29 -07:00
Alessandro Sisto
d2f12cd92c Remove PikaOptimizationsMacros
Summary: Reverting changes affecting IGListKit introduced by D34822433 (b9f81267ad)

Differential Revision: D35617758

fbshipit-source-id: c9e0928e9b314bcd8a2645f15aa6f1e8ee383bac
2022-04-14 00:25:16 -07:00
CodemodService Bot
b9f81267ad fbobjc/Apps/Instagram/AppLibraries/Guides
Differential Revision: D34822433

fbshipit-source-id: 01a11318020fc596eb5559e535497a89701be067
2022-03-17 13:01:10 -07:00
Alan Wang
b22a10e47f Add shouldDeselectItemAtIndex to IGListSectionController
Summary: Add `shouldDeselectItemAtIndex:` to `IGListSectionController`. `shouldSelectItemAtIndex:` already exists, but its inverse does not.

Reviewed By: lorixx

Differential Revision: D34727371

fbshipit-source-id: ba4e0917380e1b3ff189dad7977ac5c1caa9b714
2022-03-09 10:13:06 -08:00
Dmitry Vinnik
b6d1a96c08 Adding Social Banner in Support of Ukraine (#1556)
Summary:
Our mission at [Meta Open Source](https://opensource.facebook.com/) is to empower communities through open source, and we believe that it means building a welcoming and safe environment for all. As a part of this work, we are adding this banner in support for Ukraine during this crisis.

## Testing
<img width="1080" alt="image" src="https://user-images.githubusercontent.com/12485205/156466214-8b43b13c-617a-4167-a982-d5658173d33e.png">

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1556

Reviewed By: candance

Differential Revision: D34647758

Pulled By: dmitryvinn-fb

fbshipit-source-id: c66c38a0f195abc5285cab449cb825ac16bb8496
2022-03-04 16:30:14 -08:00
dmitryvinn
ab05b630d3 docs: Adding ELI5 video to the home page (#1555)
Summary:
Here at Meta Open Source, we've been creating short-form videos to explain Meta OSS projects in the simplest terms possible. We started embedding these videos into project pages as you can see in [Docusaurus home page](https://docusaurus.io/), [Jest](https://jestjs.io/), [Litho](https://fblitho.com/), [Hydra](https://hydra.cc/), etc.

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1555

Test Plan: <img width="1440" alt="image" src="https://user-images.githubusercontent.com/12485205/155072488-785a36f7-5873-4d94-8492-55de70702847.png">

Reviewed By: candance

Differential Revision: D34383727

Pulled By: dmitryvinn-fb

fbshipit-source-id: 918569273ad58efbbb64fac03cfe728c761a2182
2022-02-23 14:34:38 -08:00
独木舟的木
d55479ec5c Update README.zh.md (#1545)
Summary:
`pod 'IGListKit', '~> 4.0.0'`

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1545

Differential Revision: D33592010

Pulled By: lorixx

fbshipit-source-id: b01bdaa0aacc01b4d7d8ec3470903e59c58db7d9
2022-01-18 14:57:58 -08:00
Facebook Community Bot
ba849d0faa
Re-sync with internal repository (#1547) 2021-12-09 15:33:04 -08:00
jtannady
0c0f86e384
Update references from "master" to "main" 2021-12-07 16:35:00 -08:00
jtannady
45a0172f75
Update references from "master" to "main" 2021-12-07 16:33:26 -08:00
Dustin Williams
987055532a Get index path or scroll position of first visible item in list (#1544)
Summary:
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1544

Refactored and added functions to IGListAdapter for getting index path or scroll position of first visible item in list.

This makes it possible to see which item is the current first visible item scrolled to in the list, and determine how far it is scrolled into (analogous to additionalOffset in scrollToObject:).

Reviewed By: lorixx

Differential Revision: D32196398

fbshipit-source-id: d809d5f96bb4e1d95055dbebe4e55c1a428a40ed
2021-11-09 00:04:10 -08:00
Zhisheng Huang
05dd3cb71e re-run doc build script
Summary:
As title, currently https://instagram.github.io/IGListKit/ is not working.

Let's try to rebuild the doc

Reviewed By: Ziewvater

Differential Revision: D31811862

fbshipit-source-id: 8a0b0ce6c73542da71dddd13c24b5eb9fe9b0506
2021-10-28 15:49:12 -07:00
Brandon Kieft
b367f7ceb2 Handle cases where the delegate is already an IGListAdapter
Summary:
I was assuming the delegate would always be an IGListAdapterProxy, but this only happens if the client sets either the `collectionViewDelegate` or `scrollViewDelegate` properties on IGListAdapter. Otherwise the delegate will just be the IGListAdapter. Change the debug code to handle this case.

We were starting to see some debug logs roll in with the delegate class listed as IGListAdapter. Hopefully this will return the correct class now.

Differential Revision: D31690438

fbshipit-source-id: bf6dde57756fee4fe617944d45e152cae734b4f1
2021-10-19 08:48:48 -07:00
Lvv.me
0f9d8b8db2 Update CI Xcode version to 13.0 (#1536)
Summary:
## Changes in this pull request

- Update CI Xcode version to 13.0 for testing iOS 15 compatibility

### 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/1536

Reviewed By: candance

Differential Revision: D31628765

Pulled By: lorixx

fbshipit-source-id: 1583cf0e1e8df524deede1204ce1430baa39262b
2021-10-14 08:47:56 -07:00
Brandon Kieft
44c009b6fc Add TEMP code to print the delegate class in the assert message
Summary:
Trying to track down the causes of this assert. Unfortunately the assert does not tell us which class is returning the bad info. Add some HACKY TEMP code to print out the class name in some cases. Hopefully this will catch all the issues.

I put the code in a static function called within the assert, so it should be compiled out of prod builds.

Differential Revision: D31482081

fbshipit-source-id: bef0274c0e35b90d5f77b0cfd337e3f9a772e8b8
2021-10-13 19:05:24 -07:00
Ben Jessup
ad59a9ead3 Update README with SPM instructions (#1477)
Summary:
## Changes in this pull request

-Added Swift Package Manager installation instructions to README.md

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/1477

Reviewed By: candance

Differential Revision: D31358873

Pulled By: lorixx

fbshipit-source-id: 2429dd1dc42d28a82c40507ad876e514de51eab6
2021-10-13 16:10:55 -07:00
Tamarous
9ca1c692eb Fix 'The domain/default pair of (Info.plist,CFBundleShortVersionString) does not exist' issue (#1507)
Summary:
Fix 'The domain/default pair of (Info.plist,CFBundleShortVersionString) does not exist' issue

## Changes in this pull request

Issue fixed: #

when run pod install under Examples/Examples-iOS, you may encounter the error:

```
The domain/default pair of (path/to/IGListKit/Source/Info, CFBundleShortVersionString) does not exist.
[!] The `IGListDiffKit` pod failed to validate due to 1 error:
    - ERROR | version: A version is required
```
Changed the usage of `defaults read` in scripts/version.sh to `/usr/libexec/PlistBuddy` will fix the problem.

### 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/1507

Reviewed By: bdotdub

Differential Revision: D28753682

Pulled By: lorixx

fbshipit-source-id: 44fa4edffac94c48257c2d841321877d0068794a
2021-10-13 16:06:21 -07:00
Lvv.me
2f37d18be3 Fix Carthage build issue (#1531)
Summary:
## Changes in this pull request

Issue fixed:
- Fix Carthage build issue.
- Remove useless Pod files.

### 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/1531

Reviewed By: Ziewvater

Differential Revision: D31192872

Pulled By: lorixx

fbshipit-source-id: f0aa6fa1a9b3550c352cc15433f8a2a24551bc4c
2021-09-30 16:04:18 -07:00
3a4oT
a1036e06e3 SPM number10 (#1487)
Summary:
## Changes in this pull request

 A better version of https://github.com/Instagram/IGListKit/issues/1465 =)

- SPM support with script-based generations.

- added macOS Catalyst support

 ### Generate SPM layout

1. From **project's root** run:

   `bash scripts/generate_spm_sources_layout.sh`

  2. Commit Changes

 Repeat those steps each time you delete/add the project's files. **Make sure** to have this CI step which will check that `generate_spm_sources_layout.sh` is not broken.

Issue fixed: https://github.com/Instagram/IGListKit/issues/1368 #1406

### 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/1487

Reviewed By: DimaVartanian, candance

Differential Revision: D30428297

Pulled By: lorixx

fbshipit-source-id: 655291ff03445dec9b0b8cd97916f0c88207e9a7
2021-08-31 19:28:37 -07:00
Daniel Rodríguez
60bdc2edab Header compatibility with Mac Catalyst.
Summary:
In T97824645 a test that was failing for other reason was fixed and started
failing because it could not compile IGListKit.

The problem is that IGListKit was not prepared to be compiled for Mac Catalyst
since it was only testing for iOS platforms to include UIKit. These changes
modify the header to work in Mac Catalyst.

Differential Revision: D30410680

fbshipit-source-id: f886826b9c485acfb039a9e681afd85f9186c344
2021-08-19 16:56:47 -07:00
Adam Mordavsky
469306670d Adds support for Apple Silicon brew directory (#1513)
Summary:
## Changes in this pull request

Issue fixed: #

When I've tried to run the `Examples/Examples-iOS` the compilation of the project failed on the `Swiftlint` phase.
`../../scripts/lint.sh: line 8: swiftlint: command not found
    Error: SwiftLint not installed!
    Download from https://github.com/realm/SwiftLint,
    or brew install swiftlint.`

### 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/1513

Reviewed By: candance

Differential Revision: D30326670

Pulled By: lorixx

fbshipit-source-id: 99efc3bcda508ec89987f236aa38ee892c148dea
2021-08-19 09:58:10 -07:00
Zhisheng Huang
e4f0f204e1 Fix the Gemfile.lock for the CI build (#1524)
Summary:
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1524

easy

Reviewed By: bdotdub

Differential Revision: D30354078

fbshipit-source-id: 2ccca064bf78f3cc98d91660f686d36863ab9bcd
2021-08-16 17:10:48 -07:00