You should wrap the helper tool as a regular .app
bundle with at least Info.plist
. Then the problem goes away. A GUI app in OS X needs to have an Info.plist
to receive events correctly.
The way a GUI app misbehaved if not in an app bundle has never been clear to me. If I remember correctly, it changed over time, depending on OS X's versions. I think it behaved worse in previous versions of OS X. For example, the window is shown but I couldn't click any UI inside it.
Many people who compiled a program in a cross-platform toolkit faced this problem, see e.g. this discussion here in the WxWidgets wiki. Apparently, OS X doesn't mark a program not within an .app
bundle as a foreground-able app, which causes your problem. You can use TransformProcessType
from your binary not inside an .app
bundle to make a foreground-able app to solve your problem, but that's not a documented/intended usage of this function.
So, just wrap it in an .app
bundle.
Update:
This "foreground-able-ness" is controlled by the activationPolicy
of an app, see this doc on NSApplication
. Found the info on this post on Cocoa with love.