(NS)Operation KVO dependencies

86 Views Asked by At

I’m trying to observe when a new dependency is being added to an operation:

let token = operation.observe(\.dependencies, options: [.old, .new]) { (operation, changes) in
  print("dependencies modified")
}

operation.addDependency(operation2)

But the callback is never fired, is this the correct way?

0

There are 0 best solutions below