Not sure this is the appropriate forum but I haven't seen a better one.
Problem:
The Identity Services Programming Guide details how to retrieve asynchronously identities:
This works fine.
The final chapter of the document also explains how to continually monitor identities asynchronously: you just need not to call CSIdentityQueryStop() and not release the query.
As ar as I can tell, this does not work:
- creating a new user account via the System Preferences "Users & Groups" pane does not trigger a kCSIdentityQueryEventResultsAdded or kCSIdentityQueryEventResultsChanged event.
- removing a user account via the System Preferences "Users & Groups" pane does not trigger a kCSIdentityQueryEventResultsRemoved or kCSIdentityQueryEventResultsChanged event.
Tested on OS X 10.7 and macOS 10.2.2. My project code is a copy and paste of the code from the documentation. I've just changed the query to look for every single user account (including the hidden ones).
Question:
Is this supposed to work as described in the official documentation? Is there somewhere an Apple sample project that show how to make this monitoring work?