This happened to me while I was writing in Swift 4.1 in XCode 9.3. I use RxSwift also. It never happened while I was writing in Objective C. There were no any logs in Report Navigator too. Project just compiled without errors, then failed. Couldn’t figure out why.
In my case what I did and it helped:
1. Commit changes in Git and then discard changes in XCode if it shows “M” near files
2. Clear derived data: Xcode -> Preferences -> location
3. Clean build folder: Shift + Cmd + Alt + K
4. Restart XCode
After this project tried to compile and showed errors. The error was here:
1 2 3 4 5 6 7 8 9 10 |
do { let jsonData = try JSONSerialization.data(withJSONObject: timingsDict, options: .prettyPrinted) let decoder = JSONDecoder() let pTiming = try decoder.decode(PTiming.self, from: jsonData) observer.onNext(timing) observer.onCompleted() } catch { print(error.localizedDescription) observer.onError(error) } |
I passed wrong variable name in observer.onNext(timing). It should have been pTiming.