On Dec 5, 2007, at 09:12, Kyle McKay wrote:
I was going to post the below suggestion, but someone beat me to it. I have been playing around with a simple test application and that does exactly this.
Would you mind sending me your test application's source?
Are you calling TransformProcessType as early as possible?
Yes, in main(), I just decide whether to do the launcher or the server, and I call the TransformProcessType right before I call server_main().
Also keep in mind that when you're started by the finder,
We're not. We're started by launchd in the case where we make these calls (argv[1] is "--launchd" to tell me this).
you'll get this extra argument that starts with -psn_. But it seems like you could call TransformProcessType immediately in main if argc<=1 or argc==2 and argv[1] starts with "-psn_" or maybe I have the sense of that test backwards, but you get the idea about the extra argument you have to account for.
Does your application work if executed from the Terminal? (ala TestApp.app/Contents/MacOS/TestApp)? Thanks for the help, Jeremy