Thanks, Michael. I just figured out what was going on, and you're
absolutely right.

My helper's name is alphabetically before the main executable.
LaunchServices was choosing it to be launched as my application, and
the exit code (I should have realized) was the helper not
understanding the arguments passed to it by launchd.

What's perplexing is that LaunchServices clearly knew about the
CFBundleIdentifier, since it is included in the log message, but
didn't pick up on CFBundleExecutable. Could the helper's shared
instance of NSWorkspace not be affected by the new copy of the
application appearing or by the call to LSRegisterURL()? I'll try to
reduce it to a test project and file a radar...

The helper has been moved to Resources and all is working.
-Sidney

On Wed, Apr 22, 2009 at 11:12 PM, Michael Ash <michael....@gmail.com> wrote:
> On Wed, Apr 22, 2009 at 7:28 PM, Sidney San Martín <s...@sidneysm.com> wrote:
>> I just discovered a new behavior that might be helpful. I'm storing my
>> helper in MacOS (so that it can be located with [NSBundle
>> pathForAuxiliaryExecutable:]). The call to openFile: causes both my
>> application and helper to be executed. My application exits (or so
>> launchd says, even if I put an NSLog in main(), nothing is printed),
>> but my helper runs successfully.
>
> I suggest moving your helper out of MacOS. LaunchServices has various
> bugs which get exposed when you do that. You'll probably have better
> luck putting it in Resources or some other location.
>
> Mike
> _______________________________________________
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/s%40sidneysm.com
>
> This email sent to s...@sidneysm.com
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to