From 3bf9bf46f1a42e54b9ad414d991596faa9177ab6 Mon Sep 17 00:00:00 2001 From: Denys Telezhkin Date: Fri, 14 May 2021 14:06:24 +0300 Subject: [PATCH] Fix Xcode 12.5 build issue. --- CHANGELOG.md | 6 ++++++ .../DTCollectionViewDataSource.swift | 6 +++--- .../DTCollectionViewManager/DTCollectionViewManager.swift | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e57296f..c5eae97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. # Next +Note: This is backwards-compatibility release, it only fixes build issue with Xcode 12.5. For future development please consider migrating to DTCollectionViewManager 8. + +### Fixed + +* Build issues with Xcode 12.5 + ## [7.1.0](https://github.com/DenTelezhkin/DTCollectionViewManager/releases/tag/7.1.0) ### Changed diff --git a/Sources/DTCollectionViewManager/DTCollectionViewDataSource.swift b/Sources/DTCollectionViewManager/DTCollectionViewDataSource.swift index e6d205f..e16f3e6 100644 --- a/Sources/DTCollectionViewManager/DTCollectionViewDataSource.swift +++ b/Sources/DTCollectionViewManager/DTCollectionViewDataSource.swift @@ -26,7 +26,7 @@ import UIKit import DTModelStorage -//swiftlint:disable:next type_name +// swiftlint:disable:next type_name private class DummyCollectionViewCellThatPreventsAppFromCrashing: UICollectionViewCell {} /// Object, that implements `UICollectionViewDataSource` methods for `DTCollectionViewManager`. @@ -106,7 +106,7 @@ open class DTCollectionViewDataSource: DTCollectionViewDelegateWrapper, UICollec to: destination) } - @available(tvOS 10.2, *) + @available(iOS 14.0, tvOS 10.2, *) /// Implementation of `UICollectionViewDataSource` protocol. open func indexTitles(for collectionView: UICollectionView) -> [String]? { if let reaction = collectionViewReactions.first(where: { $0.methodSignature == EventMethodSignature.indexTitlesForCollectionView.rawValue }) { @@ -115,7 +115,7 @@ open class DTCollectionViewDataSource: DTCollectionViewDelegateWrapper, UICollec return (delegate as? UICollectionViewDataSource)?.indexTitles?(for: collectionView) } - @available(tvOS 10.2, *) + @available(iOS 14.0, tvOS 10.2, *) /// Implementation of `UICollectionViewDataSource` protocol. open func collectionView(_ collectionView: UICollectionView, indexPathForIndexTitle title: String, at index: Int) -> IndexPath { if let indexPath = performNonCellReaction(.indexPathForIndexTitleAtIndex, argumentOne: title, argumentTwo: index) as? IndexPath { diff --git a/Sources/DTCollectionViewManager/DTCollectionViewManager.swift b/Sources/DTCollectionViewManager/DTCollectionViewManager.swift index 029d1e7..e4fa284 100644 --- a/Sources/DTCollectionViewManager/DTCollectionViewManager.swift +++ b/Sources/DTCollectionViewManager/DTCollectionViewManager.swift @@ -94,7 +94,7 @@ open class DTCollectionViewManager { /// Factory for creating cells and reusable views for UICollectionView final lazy var viewFactory: CollectionViewFactory = { precondition(self.isManagingCollectionView, "Please call manager.startManagingWithDelegate(self) before calling any other DTCollectionViewManager methods") - //swiftlint:disable:next force_unwrapping + // swiftlint:disable:next force_unwrapping let factory = CollectionViewFactory(collectionView: self.collectionView!) factory.anomalyHandler = anomalyHandler return factory