Flocked
Flocked

Reputation: 1890

How to launch my app programmatically, if an other app opens?

I want, that my app opens when (for example) the user opens iTunes. How Can I do this?

Upvotes: 8

Views: 1069

Answers (2)

Chuck
Chuck

Reputation: 237020

Have a program always running in the background that is subscribed to NSWorkspace's NSWorkspaceDidLaunchApplicationNotification and have it do its thing when it sees iTunes as the NSWorkspaceApplicationKey object.

Upvotes: 4

Jake
Jake

Reputation: 3973

If you are talking iOS; you can't.

Upvotes: 1

Related Questions