Hello! Has anyone encountered an `unrecognized sel...
# multiplatform
k
Hello! Has anyone encountered an
unrecognized selector sent to instance
in Kotlin/Native for iOS? I have a presenter which has use cases and I just use a service locator to try and use them.
Copy code
@ThreadLocal 
object ServiceLocator {
    val myObject = MyObject()
}

class MyPresenter(val myView: MyView, val myObject: MyObject) {
    ...
}
Copy code
class ViewController: UIViewController, MyView {
    let presenter = MyPresenter.init(myView: self, myObject, ServiceLocator.init().myObject)
    ...
}
b
Can you show the full error? usually those errors contain some info about the selector name and the type of instance
k
Very weird. It's working already. We just tried it in another simulator, then used the previous simulator again and it worked without any changes.
m
@Kurt Renzo Acosta hey, did this happen again at some point? Or more importantly, did it ever happen with a real device? It just happened to us too, and as you said, after trying a different simulator and going back to the original one, it worked without changes. Makes me a bit worried about stability going forward.
k
Nope. It never occurred since then.