5

I'm trying to learn RxSwift by sample code, tutorials etc, but since most tutorials are for Swift 2 and previous versions of RxSwift, syntax have changed a bit. Normally that wouldn't be a problem, as it is possible to find the new syntax by code completion, but for RxCocoa I'm sometimes getting nothing. Example:

// UITextField
textField.rx.text.

I'm getting no suggestions at all, even though I know there are methods, since I was able to figure them out manually, but it takes a lot of time. What am I doing wrong?

Using XCode 8.1, Swift 3, RxSwift/RxCocoa 3.1, macOS Sierra and Cocoa Pods (latest stable version, updated yesterday). I've tried to create new projects and deleting DerivedData, but with the same result.

Mattias
  • 415
  • 3
  • 13
  • 1
    Unfortunately, RxSwift (more specifically with RxCocoa) seems to have some big problems with SourceKit. There's pretty much nothing to do rather than learn the most common operators and functions. – bontoJR Dec 08 '16 at 09:43
  • Alright, thank you @bontoJR! – Mattias Dec 08 '16 at 10:16
  • 1
    This is a very real problem in Xcode. It just can't handle "complex" code. Simple closures with untyped types are usually enough to throw Xcode to the curb. I suggest submitting a bug report to Apple. 3 years of this, go Apple e/ – nmdias Apr 15 '17 at 22:46
  • Try clean build -> kill SourceKit in mac's activity monitor -> Build project – Patryk Budzinski Sep 22 '21 at 12:10

0 Answers0