need to be notified when a new session is initiated or when a
user connects to the Mac
Please clarify these terms:
-
What do you mean by “session”? Are you talking about a user logging in using the GUI? Do you want to distinguish between users logged in on the console and users logged in over screen sharing? And do you care about non-GUI login sessions, that is, SSH?
-
How does that differ from “when a user connects”?
Also, what do you plan to do with this info? This matters because the best path forward depends on your final goal. For example, a daemon that’s implementing some sort of security auditing service would use a different technique than a daemon that’s tracking centralised state on behalf of these users.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"