diff --git a/Cartfile b/Cartfile index 6a8bfd62..bcb35918 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "ReactiveX/RxSwift" ~> 5.0 +github "ReactiveX/RxSwift" ~> 6.0 diff --git a/Cartfile.resolved b/Cartfile.resolved deleted file mode 100644 index b751e3d5..00000000 --- a/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "ReactiveX/RxSwift" "5.0.1" diff --git a/Carthage/Checkouts/RxSwift b/Carthage/Checkouts/RxSwift deleted file mode 160000 index 885637eb..00000000 --- a/Carthage/Checkouts/RxSwift +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 885637ebe2bf9fe17e9aaf0312f5daf4e7aae632 diff --git a/Differentiator.podspec b/Differentiator.podspec index 32849a82..00760e90 100644 --- a/Differentiator.podspec +++ b/Differentiator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Differentiator" - s.version = "4.0.1" + s.version = "5.0.0" s.summary = "Diff algorithm for UITableView and UICollectionView." s.description = <<-DESC Diff algorithm for UITableView and UICollectionView. @@ -12,12 +12,12 @@ Pod::Spec.new do |s| s.author = { "Krunoslav Zaher" => "krunoslav.zaher@gmail.com" } s.source = { :git => "https://github.com/RxSwiftCommunity/RxDataSources.git", :tag => s.version.to_s } - s.requires_arc = true + s.requires_arc = true s.swift_version = '5.0' s.source_files = 'Sources/Differentiator/**/*.swift' - s.ios.deployment_target = '8.0' + s.ios.deployment_target = '9.0' s.tvos.deployment_target = '9.0' end diff --git a/Package.swift b/Package.swift index e47abdae..ba7f6849 100644 --- a/Package.swift +++ b/Package.swift @@ -5,14 +5,14 @@ import PackageDescription let package = Package( name: "RxDataSources", platforms: [ - .iOS(.v8), .tvOS(.v9) + .iOS(.v9), .tvOS(.v9) ], products: [ .library(name: "RxDataSources", targets: ["RxDataSources"]), .library(name: "Differentiator", targets: ["Differentiator"]) ], dependencies: [ - .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.0.0")) + .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.0.0")) ], targets: [ .target(name: "RxDataSources", dependencies: ["Differentiator", "RxSwift", "RxCocoa"]), diff --git a/RxDataSources.podspec b/RxDataSources.podspec index 2115ffc8..e0107853 100644 --- a/RxDataSources.podspec +++ b/RxDataSources.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RxDataSources" - s.version = "4.0.1" + s.version = "5.0.0" s.summary = "This is a collection of reactive data sources for UITableView and UICollectionView." s.description = <<-DESC This is a collection of reactive data sources for UITableView and UICollectionView. @@ -37,11 +37,11 @@ data s.swift_version = '5.0' s.source_files = 'Sources/RxDataSources/**/*.swift' - s.dependency 'Differentiator', '~> 4.0' - s.dependency 'RxSwift', '~> 5.0' - s.dependency 'RxCocoa', '~> 5.0' + s.dependency 'Differentiator', '~> 5.0' + s.dependency 'RxSwift', '~> 6.0' + s.dependency 'RxCocoa', '~> 6.0' - s.ios.deployment_target = '8.0' + s.ios.deployment_target = '9.0' s.tvos.deployment_target = '9.0' end diff --git a/RxDataSources.xcodeproj/project.pbxproj b/RxDataSources.xcodeproj/project.pbxproj index 5e918edb..ee015f9c 100644 --- a/RxDataSources.xcodeproj/project.pbxproj +++ b/RxDataSources.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -15,8 +15,9 @@ 03EEEE961F5B7D71006068BC /* Randomizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03EEEE851F5B7D5C006068BC /* Randomizer.swift */; }; 03EEEE971F5B7D71006068BC /* s.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03EEEE861F5B7D5C006068BC /* s.swift */; }; 03EEEE981F5B7D71006068BC /* XCTest+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03EEEE871F5B7D5C006068BC /* XCTest+Extensions.swift */; }; - 80FB1F5C228489FF009D6516 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80FB1F48228489EC009D6516 /* RxSwift.framework */; }; - 80FB1F5D22848A0E009D6516 /* RxCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80FB1F4A228489EC009D6516 /* RxCocoa.framework */; }; + A2B2B506259938BD00B45031 /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = A2B2B505259938BD00B45031 /* RxRelay */; }; + A2B2B508259938BD00B45031 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = A2B2B507259938BD00B45031 /* RxSwift */; }; + A2B2B50A259938BD00B45031 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = A2B2B509259938BD00B45031 /* RxCocoa */; }; C81FBF461F3B9CED0094061E /* Differentiator.podspec in Resources */ = {isa = PBXBuildFile; fileRef = C81FBF451F3B9CED0094061E /* Differentiator.podspec */; }; C81FBF5E1F3B9D660094061E /* Array+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81FBF5B1F3B9D4C0094061E /* Array+Extensions.swift */; }; C81FBF601F3B9D8B0094061E /* FloatingPointType+IdentifiableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81FBF5F1F3B9D8B0094061E /* FloatingPointType+IdentifiableType.swift */; }; @@ -206,8 +207,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 80FB1F5D22848A0E009D6516 /* RxCocoa.framework in Frameworks */, - 80FB1F5C228489FF009D6516 /* RxSwift.framework in Frameworks */, + A2B2B506259938BD00B45031 /* RxRelay in Frameworks */, + A2B2B50A259938BD00B45031 /* RxCocoa in Frameworks */, + A2B2B508259938BD00B45031 /* RxSwift in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -424,6 +426,11 @@ C82C3C9B1F3B93D200309AE8 /* PBXTargetDependency */, ); name = RxDataSources; + packageProductDependencies = ( + A2B2B505259938BD00B45031 /* RxRelay */, + A2B2B507259938BD00B45031 /* RxSwift */, + A2B2B509259938BD00B45031 /* RxCocoa */, + ); productName = RxDataSources; productReference = C8984C5A1C36AF35001E4272 /* RxDataSources.framework */; productType = "com.apple.product-type.framework"; @@ -435,7 +442,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0810; - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1230; ORGANIZATIONNAME = kzaher; TargetAttributes = { C81905AD1DEA019100AE679C = { @@ -461,6 +468,9 @@ Base, ); mainGroup = C8984C501C36AF35001E4272; + packageReferences = ( + A2B2B504259938BD00B45031 /* XCRemoteSwiftPackageReference "RxSwift" */, + ); productRefGroup = C8984C5B1C36AF35001E4272 /* Products */; projectDirPath = ""; projectReferences = ( @@ -678,8 +688,12 @@ CLANG_WARN_SUSPICIOUS_MOVES = YES; DEVELOPMENT_TEAM = 783T66X79Y; INFOPLIST_FILE = Tests/RxDataSourcesTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = io.rx.Tests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -695,11 +709,16 @@ CLANG_WARN_SUSPICIOUS_MOVES = YES; DEVELOPMENT_TEAM = 783T66X79Y; INFOPLIST_FILE = Tests/RxDataSourcesTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = io.rx.Tests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; }; name = Release; }; @@ -717,7 +736,11 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Sources/Differentiator/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.rxswiftcommunity.Differentiator; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -740,12 +763,17 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Sources/Differentiator/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.rxswiftcommunity.Differentiator; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; }; name = Release; }; @@ -771,6 +799,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -782,26 +811,10 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - "FRAMEWORK_SEARCH_PATHS[sdk=appletvos*]" = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/tvOS/Static", - "$(PROJECT_DIR)/Carthage/Build/tvOS/", - ); - "FRAMEWORK_SEARCH_PATHS[sdk=appletvsimulator*]" = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/tvOS/Static", - "$(PROJECT_DIR)/Carthage/Build/tvOS/", - ); - "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - "$(PROJECT_DIR)/Carthage/Build/iOS/", - ); - "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - "$(PROJECT_DIR)/Carthage/Build/iOS/", - ); + "FRAMEWORK_SEARCH_PATHS[sdk=appletvos*]" = "$(inherited)"; + "FRAMEWORK_SEARCH_PATHS[sdk=appletvsimulator*]" = "$(inherited)"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = "$(inherited)"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -816,11 +829,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - "LD_RUNPATH_SEARCH_PATHS[sdk=appletvos*]" = "$(inherited) $(PROJECT_DIR)/Carthage/Build/tvOS"; - "LD_RUNPATH_SEARCH_PATHS[sdk=appletvsimulator*]" = "$(inherited) $(PROJECT_DIR)/Carthage/Build/tvOS"; - "LD_RUNPATH_SEARCH_PATHS[sdk=iphoneos*]" = "$(inherited) $(PROJECT_DIR)/Carthage/Build/iOS"; - "LD_RUNPATH_SEARCH_PATHS[sdk=iphonesimulator*]" = "$(inherited) $(PROJECT_DIR)/Carthage/Build/iOS"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + "LD_RUNPATH_SEARCH_PATHS[sdk=appletvos*]" = "$(inherited)"; + "LD_RUNPATH_SEARCH_PATHS[sdk=appletvsimulator*]" = "$(inherited)"; + "LD_RUNPATH_SEARCH_PATHS[sdk=iphoneos*]" = "$(inherited)"; + "LD_RUNPATH_SEARCH_PATHS[sdk=iphonesimulator*]" = "$(inherited)"; MACOSX_DEPLOYMENT_TARGET = 10.10; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -829,7 +842,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 12.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; WATCHOS_DEPLOYMENT_TARGET = 2.0; @@ -858,6 +871,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -869,26 +883,10 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - "FRAMEWORK_SEARCH_PATHS[sdk=appletvos*]" = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/tvOS/Static", - "$(PROJECT_DIR)/Carthage/Build/tvOS/", - ); - "FRAMEWORK_SEARCH_PATHS[sdk=appletvsimulator*]" = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/tvOS/Static", - "$(PROJECT_DIR)/Carthage/Build/tvOS/", - ); - "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - "$(PROJECT_DIR)/Carthage/Build/iOS/", - ); - "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - "$(PROJECT_DIR)/Carthage/Build/iOS/", - ); + "FRAMEWORK_SEARCH_PATHS[sdk=appletvos*]" = "$(inherited)"; + "FRAMEWORK_SEARCH_PATHS[sdk=appletvsimulator*]" = "$(inherited)"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = "$(inherited)"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -897,19 +895,20 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - "LD_RUNPATH_SEARCH_PATHS[sdk=appletvos*]" = "$(inherited) $(PROJECT_DIR)/Carthage/Build/tvOS"; - "LD_RUNPATH_SEARCH_PATHS[sdk=appletvsimulator*]" = "$(inherited) $(PROJECT_DIR)/Carthage/Build/tvOS"; - "LD_RUNPATH_SEARCH_PATHS[sdk=iphoneos*]" = "$(inherited) $(PROJECT_DIR)/Carthage/Build/iOS"; - "LD_RUNPATH_SEARCH_PATHS[sdk=iphonesimulator*]" = "$(inherited) $(PROJECT_DIR)/Carthage/Build/iOS"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + "LD_RUNPATH_SEARCH_PATHS[sdk=appletvos*]" = "$(inherited)"; + "LD_RUNPATH_SEARCH_PATHS[sdk=appletvsimulator*]" = "$(inherited)"; + "LD_RUNPATH_SEARCH_PATHS[sdk=iphoneos*]" = "$(inherited)"; + "LD_RUNPATH_SEARCH_PATHS[sdk=iphonesimulator*]" = "$(inherited)"; MACOSX_DEPLOYMENT_TARGET = 10.10; MTL_ENABLE_DEBUG_INFO = NO; OTHER_SWIFT_FLAGS = ""; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 12.0; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -928,7 +927,11 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Sources/RxDataSources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = kzaher.RxDataSources; PRODUCT_NAME = RxDataSources; SKIP_INSTALL = YES; @@ -947,12 +950,17 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Sources/RxDataSources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = kzaher.RxDataSources; PRODUCT_NAME = RxDataSources; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos appletvsimulator"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; }; name = Release; }; @@ -996,6 +1004,35 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + A2B2B504259938BD00B45031 /* XCRemoteSwiftPackageReference "RxSwift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/ReactiveX/RxSwift"; + requirement = { + branch = rxswift6; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + A2B2B505259938BD00B45031 /* RxRelay */ = { + isa = XCSwiftPackageProductDependency; + package = A2B2B504259938BD00B45031 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxRelay; + }; + A2B2B507259938BD00B45031 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = A2B2B504259938BD00B45031 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + A2B2B509259938BD00B45031 /* RxCocoa */ = { + isa = XCSwiftPackageProductDependency; + package = A2B2B504259938BD00B45031 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxCocoa; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = C8984C511C36AF35001E4272 /* Project object */; } diff --git a/RxDataSources.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RxDataSources.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 9e63a231..919434a6 100644 --- a/RxDataSources.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/RxDataSources.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/RxDataSources.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/RxDataSources.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..77794656 --- /dev/null +++ b/RxDataSources.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "RxSwift", + "repositoryURL": "https://github.com/ReactiveX/RxSwift", + "state": { + "branch": "rxswift6", + "revision": "4e5f359d1313fa6fac816ab309431c214d706faa", + "version": null + } + } + ] + }, + "version": 1 +} diff --git a/RxDataSources.xcodeproj/xcshareddata/xcschemes/Differentiator.xcscheme b/RxDataSources.xcodeproj/xcshareddata/xcschemes/Differentiator.xcscheme index aff9d870..2e091398 100644 --- a/RxDataSources.xcodeproj/xcshareddata/xcschemes/Differentiator.xcscheme +++ b/RxDataSources.xcodeproj/xcshareddata/xcschemes/Differentiator.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - - - - - } open func model(at indexPath: IndexPath) throws -> Any { + guard indexPath.section < self._sectionModels.count, + indexPath.item < self._sectionModels[indexPath.section].items.count else { + throw RxDataSourceError.outOfBounds(indexPath: indexPath) + } + return self[indexPath] } diff --git a/Sources/RxDataSources/DataSources.swift b/Sources/RxDataSources/DataSources.swift index b978e03a..25b10c60 100644 --- a/Sources/RxDataSources/DataSources.swift +++ b/Sources/RxDataSources/DataSources.swift @@ -10,8 +10,9 @@ import Foundation @_exported import Differentiator -enum RxDataSourceError : Error { +enum RxDataSourceError: Error { case preconditionFailed(message: String) + case outOfBounds(indexPath: IndexPath) } func rxPrecondition(_ condition: Bool, _ message: @autoclosure() -> String) throws { diff --git a/Sources/RxDataSources/TableViewSectionedDataSource.swift b/Sources/RxDataSources/TableViewSectionedDataSource.swift index 91f5ddab..0ba1558a 100644 --- a/Sources/RxDataSources/TableViewSectionedDataSource.swift +++ b/Sources/RxDataSources/TableViewSectionedDataSource.swift @@ -109,6 +109,11 @@ open class TableViewSectionedDataSource } open func model(at indexPath: IndexPath) throws -> Any { + guard indexPath.section < self._sectionModels.count, + indexPath.item < self._sectionModels[indexPath.section].items.count else { + throw RxDataSourceError.outOfBounds(indexPath: indexPath) + } + return self[indexPath] }