Raviprakash
Raviprakash

Reputation: 2440

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 launch) or is it launch agent launching my application.

Upvotes: 3

Views: 708

Answers (1)

Ken Aspeslagh
Ken Aspeslagh

Reputation: 11594

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.

Upvotes: 3

Related Questions