Hi there, any hint how to call an `object` from iO...
# multiplatform
h
Hi there, any hint how to call an
object
from iOS side? Let's say I have in commonMain a
Copy code
object Foo
How can i call
Foo
from iOS side? If I try to use Foo directly I actually somehow access the Type, but not the singleton instance. Any idea?
k
Foo()
s
Calling
Foo()
returns the same instance for Kotlin
object
. Even though it looks like you are calling a constructor, you are really just accessing the singleton. You can confirm this by testing that
Foo() === Foo()
h
thanks!