Created
April 16, 2018 13:17
-
-
Save inamiy/d61ea7d0850a9d8470b5b2d60cba9d48 to your computer and use it in GitHub Desktop.
RxSwift v4.0.0 KVO + methodInvoked collision
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
example("Crash") { | |
let scrollView = UIScrollView() | |
scrollView.rx.observe(CGSize.self, "contentSize").subscribe() | |
scrollView.rx.methodInvoked(#selector(UIScrollView.layoutSubviews)).subscribe() | |
// --- Unhandled error happened: Collision between RxCocoa interception mechanism and KVO. To resolve this conflict please use this interception mechanism first. example --- | |
// Unhandled error happened: Collision between RxCocoa interception mechanism and KVO. To resolve this conflict please use this interception mechanism first. | |
// Target: <UIScrollView: 0x7fa397810600; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x60c000042820>; layer = <CALayer: 0x60c00002d660>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}> | |
// subscription called from: | |
// | |
} |
Note: Call order doesn't matter.
I too get this problem using Xcode 9.3, Swift 4.1 and Cocoapods 1.5 without use_frameworks!
. If I include use_frameworks!
in the Podfile it works. hmm.... Any idea?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error description: https://github.com/ReactiveX/RxSwift/blob/ba41245d067af562c6e61b9439ea1686c1fb60ad/RxCocoa/Common/RxCocoaObjCRuntimeError%2BExtensions.swift#L100-L103