Hannes

    Hannes

    2 years ago
    Hi there, any hint how to call an
    object
    from iOS side? Let's say I have in commonMain a
    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?
    kpgalligan

    kpgalligan

    2 years ago
    Foo()
    spierce7

    spierce7

    2 years ago
    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()
    Hannes

    Hannes

    2 years ago
    thanks!