Skip to content

When a Kotlin object displays as None, its attributes and other information are not visible, but it actually holds values. #125

@cbskbs

Description

@cbskbs

commonMain

interface ICallback {
    fun onCall(params: Map<String, Any?>)
}

object SDKManager {

    private var callback: ICallback? = null

    fun setCallback(callback: ICallback?) {
        this.callback = callback
    }
}

iosApp

import SwiftUI
import shared

@main
struct iOSApp: App {

    init() {
        class SwiftCallback : ICallback {
            func onCall(params: [String : Any]) {
            }
        }

        SDKManager.shared.setCallback(callback: SwiftCallback())
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

Debug
callback ObjHeader * None 0x00000001014e0020

The correct value should be 0x1014e0020 ?

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions