I’m attempting to write some Kotlin Native that us...
# kotlin-native
a
I’m attempting to write some Kotlin Native that uses AVPlayer and I was trying to register a listener and am running into the same issue as this SO question: https://stackoverflow.com/questions/61796380/is-it-possible-to-observe-ios-nsobject-value-changes-with-kotlin-native Wondering if there’s an updates on this? or any workarounds. A code snippet from my project looks like this:
Copy code
val observer = object : NSObject() {
            fun observeValue(
                observer: NSObject,
                forKeyPath: String,
                options: NSKeyValueObservingOptions,
                context: COpaquePointer?
            ) {
                print("Data Changed!!!")
            }
        }

        player?.addObserver(observer, "rate", NSKeyValueObservingOptionNew, null)
Also if there’s no change, is there a YouTrack ticket for this?