I have a kmm app. In swiftUI I call the login meth...
# kotlin-native
d
I have a kmm app. In swiftUI I call the login method from the Kotlin repo:
Copy code
repo.login(email: $userId.wrappedValue, password: $password.wrappedValue) { user, error in
      }
I have 2 methods that login identically on my Realm repository.
Copy code
suspend fun login(email: String, password: String): User {
        return appService.login(Credentials.emailPassword(email, password))
    }
suspend fun dologin(email: String, password: String): User {
        return appService.login(Credentials.emailPassword(email, password))
    }
But just the first login works:
repo.login
Whenever I try to use the second login:
repo.dologin
, it will show the exception:
Copy code
libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SharedRealmRepo dologinEmail:password:completionHandler:]: unrecognized selector sent to instance 0x281fe4960'
terminating with uncaught exception of type NSException
Why this happens? Do I need to recompile the shared module in some way?