Description
Short description of the issue:
In iOS 15 setting some UITableViewDiffableDataSource as UITableView datasource leads to terminating app due to uncaught exception, when trying to acess to .rx.dataSource
Expected outcome:
It works as expected on iOS 13 and 14
What actually happens:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RxCocoa.RxTableViewDataSourceProxy _subclassOverridesMethodWithSelector:]: unrecognized selector sent to instance ...'
Self contained code example that reproduces the issue:
let someTableView = UITableView(frame: .zero)
let someDataSource = UITableViewDiffableDataSource<Int, Int>(tableView: someTableView) { tableView, indexPath, _ in
return tableView.dequeueReusableCell(withIdentifier: "", for: indexPath)
}
let _ = someTableView.rx.dataSource
RxSwift/RxCocoa/RxBlocking/RxTest version/commit
RxSwift 6.2.0
Platform/Environment
- iOS
- macOS
- tvOS
- watchOS
- playgrounds
How easy is to reproduce? (chances of successful reproduce after running the self contained code)
- easy, 100% repro
- sometimes, 10%-100%
- hard, 2% - 10%
- extremely hard, %0 - 2%
Xcode version:
Xcode 13.0 (13A233)
Installation method:
- CocoaPods
- Carthage
- Git submodules
- Swift Package Manager
I have multiple versions of Xcode installed:
(so we can know if this is a potential cause of your issue)
- yes (which ones)
- no
Level of RxSwift knowledge:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)
- just starting
- I have a small code base
- I have a significant code base