I had asked this question regarding some Apple code and making it work.
I have looked here but the answer there does not solve my problem Although I solved that problem I am not getting the bellow error on the line shown.
Thread 5: Simultaneous accesses to 0x10b883638, but modification requires exclusive access
private var playerItemContext = 0
override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
// Only handle observations for the playerItemContext
print("jdslfhjkfdhaldfahjkflhajfldashkjfdshkjlas")
guard context == &playerItemContext else {
super.observeValue(forKeyPath: keyPath, of: object,change: change, context: context)
return
}
...
Why is this and how can I fix this?