You don't need to disable sandboxing for this, just observe NSWorkspaceDidLaunchApplicationNotification
in the notification center provided by NSWorkspace
, not the distributed one.
You'll get an instance of NSRunningApplication
in the user info of the notification, which you can use to determine whether the launched app was iTunes (use the bundleIdentifier
property).