I'm using the latest RxSwift library for reactive programming and facing a strange problem when debugging my code in Xcode 9.1!
I have a collectionView
inside tableView
header and bind selectedItem
of collectionView
to ViewModel variable to filter out section items. But when I change selected item of collectionView
Xcode crashes and I can't figure out the problem! Is it related to libraries that I use or it's Xcode bug?

- 153
- 1
- 2
- 13
-
2Please add the error and your code. – Kevinosaurio Nov 16 '17 at 17:57
-
Need more context. – Maxim Volgin Nov 17 '17 at 04:40
1 Answers
Since I had a similar problem, maybe my "solution" will help you as well:
After browsing the RxSwift github issues for a bit I came across this issue: https://github.com/ReactiveX/RxSwift/issues/1463
While not exactly the same, I tried the proposed solution - Bumping the Pods' Optimization level from None to Fast.
That did the trick.
Apparently when installed via CocoaPods and when running in Debug mode RxSwift's asserts not only crash the app but also the IDE itself. At least that's what I got from the whole ordeal. Now, while the proposed solution may not be the technically best one (since we're now seemingly ignoring asserts that may actually be important), it got my code working again.
Screenshot of where and what to set in XCode's project settings

- 133
- 9
-
I'm not using RxSwift but it turned out, as Xcode 9.2 (9C40b) was crashing on me for unknown reason while debugging an iPhone app, that an `assert(false, "xxx")` call would not only assert the app on the iPhone, but also crash Xcode. Very crazy. To avoid it I just don't use assert in that place... App is written in Swift 4. – Jonny Mar 20 '18 at 07:15