How to check whether application is launched by user or NSWorkspace
I have one Cocoa application and one launch agent. Launch agent launches application using
launchAppWithBundleIdentifier:
method call.
It seems like you should be able to send an Apple Event via the additionalEventParamDescriptor: parameter of the launchAppWithBundleIdentifier: call and then receive that in your app so you know it's your agent launching you.
精彩评论