开发者

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.

Inside my application I want to check application is launched by user(Normal launc开发者_JS百科h) or is it launch agent launching my application.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜