Skip to content

RxSwift 6.0 support #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .spm.pods/packages/.umbrella/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// swift-tools-version:5.7
import PackageDescription

let package = Package(
name: "_umbrella_",
dependencies: [

]
)
2 changes: 1 addition & 1 deletion Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ViewController: UIViewController {
let dataSource = RxASTableAnimatedDataSource<NumberSection>(configureCell: configureCell, titleForHeaderInSection: titleForHeaderInSection)

Observable<Int>
.interval(2.0, scheduler: MainScheduler.instance)
.interval(.seconds(2), scheduler: MainScheduler.instance)
.map { _ in
var sectionIndex = Set<Int>()
var section = [NumberSection]()
Expand Down
23 changes: 18 additions & 5 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '13.0'

target 'Example' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

pod 'Texture'
pod 'RxSwift'
pod 'RxCocoa'
pod 'Differentiator'
pod 'Texture', '~> 3.0'
pod 'RxSwift', '~> 6.0'
pod 'RxCocoa', '~> 6.0'
pod 'Differentiator', '~> 5.0'

end

post_install do |pod_installer|
pod_installer.pods_project.targets.each do |t|
if t.respond_to?(:product_type) and t.product_type == "com.apple.product-type.bundle"
t.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
94 changes: 61 additions & 33 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,46 +1,74 @@
PODS:
- Differentiator (3.0.2)
- PINCache (3.0.1-beta.5):
- PINCache/Arc-exception-safe (= 3.0.1-beta.5)
- PINCache/Core (= 3.0.1-beta.5)
- PINCache/Arc-exception-safe (3.0.1-beta.5):
- Differentiator (5.0.0)
- PINCache (3.0.4):
- PINCache/Arc-exception-safe (= 3.0.4)
- PINCache/Core (= 3.0.4)
- PINCache/Arc-exception-safe (3.0.4):
- PINCache/Core
- PINCache/Core (3.0.1-beta.5):
- PINOperation (= 1.0.3)
- PINOperation (1.0.3)
- PINRemoteImage/Core (3.0.0-beta.12):
- PINCache/Core (3.0.4):
- PINOperation (~> 1.2.3)
- PINOperation (1.2.3)
- PINRemoteImage/Core (3.0.3):
- PINOperation
- PINRemoteImage/iOS (3.0.0-beta.12):
- PINRemoteImage/iOS (3.0.3):
- PINRemoteImage/Core
- PINRemoteImage/PINCache (3.0.0-beta.12):
- PINCache (= 3.0.1-beta.5)
- PINRemoteImage/PINCache (3.0.3):
- PINCache (~> 3.0.3)
- PINRemoteImage/Core
- RxCocoa (4.0.0):
- RxSwift (~> 4.0)
- RxSwift (4.0.0)
- Texture (2.5.1):
- Texture/PINRemoteImage (= 2.5.1)
- Texture/Core (2.5.1)
- Texture/PINRemoteImage (2.5.1):
- PINRemoteImage/iOS (= 3.0.0-beta.12)
- RxCocoa (6.9.0):
- RxRelay (= 6.9.0)
- RxSwift (= 6.9.0)
- RxRelay (6.9.0):
- RxSwift (= 6.9.0)
- RxSwift (6.9.0)
- Texture (3.1.0):
- Texture/AssetsLibrary (= 3.1.0)
- Texture/Core (= 3.1.0)
- Texture/MapKit (= 3.1.0)
- Texture/Photos (= 3.1.0)
- Texture/PINRemoteImage (= 3.1.0)
- Texture/Video (= 3.1.0)
- Texture/AssetsLibrary (3.1.0):
- Texture/Core
- Texture/Core (3.1.0)
- Texture/MapKit (3.1.0):
- Texture/Core
- Texture/Photos (3.1.0):
- Texture/Core
- Texture/PINRemoteImage (3.1.0):
- PINRemoteImage/iOS (~> 3.0.0)
- PINRemoteImage/PINCache
- Texture/Core
- Texture/Video (3.1.0):
- Texture/Core

DEPENDENCIES:
- Differentiator
- RxCocoa
- RxSwift
- Texture
- Differentiator (~> 5.0)
- RxCocoa (~> 6.0)
- RxSwift (~> 6.0)
- Texture (~> 3.0)

SPEC REPOS:
trunk:
- Differentiator
- PINCache
- PINOperation
- PINRemoteImage
- RxCocoa
- RxRelay
- RxSwift
- Texture

SPEC CHECKSUMS:
Differentiator: a87be69eba49ec4ab460c7671143ee3a9eececfd
PINCache: 98e7b1ef782824ad231ade51987c218b758c30d8
PINOperation: ac23db44796d4a564ecf9b5ea7163510f579b71d
PINRemoteImage: 0cefe720c2612960bd360710efbd6c73a1991d5f
RxCocoa: d62846ca96495d862fa4c59ea7d87e5031d7340e
RxSwift: fd680d75283beb5e2559486f3c0ff852f0d35334
Texture: c3f06e344aa091667b7a56002e525cde674d021a
Differentiator: e8497ceab83c1b10ca233716d547b9af21b9344d
PINCache: d9a87a0ff397acffe9e2f0db972ac14680441158
PINOperation: fb563bcc9c32c26d6c78aaff967d405aa2ee74a7
PINRemoteImage: f1295b29f8c5e640e25335a1b2bd9d805171bd01
RxCocoa: ac16414696ae706516be3e1ab00fcce5bdc9be8a
RxRelay: 6b0c930e5cef57d5fe2032571e5e65b78e3cbdb1
RxSwift: 31649ace6aceeb422e16ff71c60804f9c3281ed9
Texture: 2e8ab2519452515f7f5a520f5a8f7e0a413abfa3

PODFILE CHECKSUM: df58f9cead49c76984203f4eab4ded96071c8990
PODFILE CHECKSUM: dc5305793a55e4c9fa3f639b5a699c7c567de9f5

COCOAPODS: 1.3.1
COCOAPODS: 1.15.2
6 changes: 3 additions & 3 deletions RxASDataSources.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Pod::Spec.new do |s|
s.source_files = "Sources/**/*.swift"
s.framework = "Foundation"

s.dependency 'RxSwift', '~> 5.1'
s.dependency 'RxCocoa', '~> 5.1'
s.dependency 'Differentiator', '~> 4.0'
s.dependency 'RxSwift', '~> 6.0'
s.dependency 'RxCocoa', '~> 6.0'
s.dependency 'Differentiator', '~> 5.0'
s.dependency 'Texture', '~> 3.0'

end
31 changes: 9 additions & 22 deletions RxASDataSources.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@
57826BA41F29491800FB0414 /* Frameworks */,
57826BA51F29491800FB0414 /* Resources */,
F287AD5C5D01FE15DAF7988F /* [CP] Embed Pods Frameworks */,
B17F3E75B8B24C7AC6478D18 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -368,6 +367,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -403,21 +403,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
B17F3E75B8B24C7AC6478D18 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
DAF660CD4A78B5AD6D0C8067 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -442,12 +427,13 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Differentiator/Differentiator.framework",
"${BUILT_PRODUCTS_DIR}/PINCache/PINCache.framework",
"${BUILT_PRODUCTS_DIR}/PINOperation/PINOperation.framework",
"${BUILT_PRODUCTS_DIR}/PINRemoteImage/PINRemoteImage.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
"${BUILT_PRODUCTS_DIR}/Texture/AsyncDisplayKit.framework",
);
Expand All @@ -458,12 +444,13 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PINOperation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PINRemoteImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AsyncDisplayKit.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -674,7 +661,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.dangthaison91.RxASDataSources;
PRODUCT_NAME = RxASDataSources;
Expand All @@ -693,7 +680,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.dangthaison91.RxASDataSources;
PRODUCT_NAME = RxASDataSources;
Expand All @@ -716,7 +703,7 @@
"$(PROJECT_DIR)/Carthage/Checkouts/RxDataSources/build/Debug-iphoneos",
);
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.dangthaison91.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -739,7 +726,7 @@
"$(PROJECT_DIR)/Carthage/Checkouts/RxDataSources/build/Debug-iphoneos",
);
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.dangthaison91.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import RxCocoa
public extension Reactive where Base: ASCollectionNode {
func items<DataSource: RxASCollectionDataSourceType & ASCollectionDataSource, O: ObservableType>(dataSource: DataSource)
-> (_ source: O)
-> Disposable where DataSource.Element == O.E {
-> Disposable where DataSource.Element == O.Element {

return { source in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ open class ASCollectionSectionedDataSource<S: SectionModelType>: NSObject, ASCol
return cell
}

open func collectionNode(_ collectionNode: ASCollectionNode, canMoveItemAt indexPath: IndexPath) -> Bool {
open func collectionNode(_ collectionNode: ASCollectionNode, canMoveItemWith node: ASCellNode) -> Bool {
guard let indexPath = node.indexPath else { return false }
return canMoveItemAtIndexPath(self, indexPath)
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/DataSources/ASTableNode+Rx/ASTableNode+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import RxCocoa
public extension Reactive where Base: ASTableNode {
func items<DataSource: RxASTableDataSourceType & ASTableDataSource, O: ObservableType>(dataSource: DataSource)
-> (_ source: O)
-> Disposable where DataSource.Element == O.E {
-> Disposable where DataSource.Element == O.Element {

return { source in

Expand Down
4 changes: 2 additions & 2 deletions Sources/DataSources/RxHelper/ASDelegateProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import RxSwift
import RxCocoa

extension ObservableType {
func subscribeProxyDataSource<DelegateProxy: DelegateProxyType>(ofObject object: DelegateProxy.ParentObject, dataSource: DelegateProxy.Delegate, retainDataSource: Bool, binding: @escaping (DelegateProxy, Event<E>) -> Void)
func subscribeProxyDataSource<DelegateProxy: DelegateProxyType>(ofObject object: DelegateProxy.ParentObject, dataSource: DelegateProxy.Delegate, retainDataSource: Bool, binding: @escaping (DelegateProxy, Event<Element>) -> Void)
-> Disposable
where DelegateProxy.ParentObject: ASDisplayNode {

Expand All @@ -36,7 +36,7 @@ extension ObservableType {
// source can never end, otherwise it would release the subscriber, and deallocate the data source
.concat(Observable.never())
.takeUntil(object.rx.deallocated)
.subscribe { [weak object] (event: RxSwift.Event<E>) in
.subscribe { [weak object] (event: RxSwift.Event<Element>) in

if let object = object {
// TODO: Enable assert again to prevent Proxy changed
Expand Down