I use CMIOObjectAddPropertyListener for this kind of communication (of state changes from the extension to an app).
That said, I'm surprised at this line
[mObserverClassInstance subscribe:@(notification.c_str())];
because I thought @ could only be used with string literals, so you could write
[mObserverClassInstance subscribe:@"VirtualCamUsageChanged"];
I've never seen @ used with a run-time expression.
Topic:
Programming Languages
SubTopic:
Swift
Tags: