arnauddorgans / InfiniteLayout

Horizontal and Vertical infinite scrolling feature for UICollectionView with Paging, NSProxy delegate, Reactive extension, SectionModel & AnimatableSectionModel support
MIT License
516 stars 63 forks source link

Update Package.swift manifest to define RxInfiniteLayout product #16

Closed cdann-leafly closed 4 years ago

cdann-leafly commented 4 years ago

Update Package.swift manifest to define RxInfiniteLayout product and target, allowing RxSwift-related classes and extensions to be imported via Swift Package Manager.

This continues to allow importing InfiniteLayout via Swift Package Manager without an RxSwift dependency, and optionally allows Rx support to be included by depending on the additional RxInfiniteLayout product, which depends on RxSwift, RxCocoa and RxDataSource.

Because the Rx-related classes are in a separate library module, they must import the InfiniteLayout module. This also required more permissive (open) access to InfiniteCollectionView and InfiniteDataSource.

Also, because the InfiniteLayout package might not exist when importing this library via CocoaPods (or other dependency managers), I wrapped the import statements in conditional-compilation directives.