Getting the below ambiguity compile error when try...
# ios
g
Getting the below ambiguity compile error when trying to define a Kotlin interface function in Swift.
'KotlinInt' is ambiguous for type lookup in this context
Copy code
func onPing(value: KotlinInt?) async throws {
        
}

interface PingListener {
    suspend fun onPing(value: Int?)
}
a
You can try to add your framework name as a namespace there:
<SharedFrameworkName>.KotlinInt?
.
g
This error I’m getting in Xcode when trying to confirm Kotlin Interface
I did import that framework in which interface is declared but that did not work out
a
Got it... so, did you try to use framework name to explicitly specify class namespace?
g
Removing the optional (?) from the interface worked. and We replaced KotlinInt with Int32 in the Swift function