Re: -[NSSharedWorkspace openFile:]: Application exits with status 255
Re: -[NSSharedWorkspace openFile:]: Application exits with status 255
- Subject: Re: -[NSSharedWorkspace openFile:]: Application exits with status 255
- From: Sidney San Martín <email@hidden>
- Date: Thu, 23 Apr 2009 11:34:19 -0400
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 <email@hidden> wrote:
> On Wed, Apr 22, 2009 at 7:28 PM, Sidney San Martín <email@hidden> 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 (email@hidden)
>
> 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:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden