I am using the KVO mechanism in CBLLiveQuery in Swift and the application itself seems to be working fine.
But now I am writing tests (XCTest framework) and they crash consistently on startup (BAD ACCESS on
liveQuery.addObserver(self, forKeyPath: "rows", options: NSKeyValueObservingOptions.allZeros, context: nil)
Obviously, the “self” object conforms to the right protocol and so on…
This same line of code works when the app runs “for real”.
Does this ring any bell to anyone ?