• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
LaunchApplication woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LaunchApplication woes


  • Subject: LaunchApplication woes
  • From: Dave Hersey <email@hidden>
  • Date: Thu, 27 Nov 2003 00:18:07 -0500

Hi,

I'm using 10.2.8 and I'm trying to launch one Cocoa application from
another. I've been trying to get the NSWorkspace API to work:

[[NSWorkspace sharedWorkspace] launchApplication: @"OtherApp"];


But I keep getting this error, and my app doesn't launch:

StatusItemApp[822] LSOpenFromURLSpec() returned 1000 for application
OtherApp path (null).


I've even tried calling LaunchServices directly:

OSStatus anErr;
FSRef appRef;

anErr = LSFindApplicationForInfo(OtherAppCreatorType,
(CFStringRef) OtherAppBundleID,
NULL,
&appRef,
NULL);
if (anErr == noErr)
{
anErr = LSOpenFSRef(&appRef, NULL);
}

But, I get the same 1000 error at the LSOpenFSRef. However, the
LSFindApplicationForInfo returns noErr.


If I change the app name in the first case to "Clock" then that application
*is* launched.

I've tried moving my application to the Applications folder but even then it
isn't launched. Is there some setting I need in my plist to allow the launch
or is the OS just not aware of my application? The problem seems to be
totally specific to my app.

Thanks,

Dave
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Adding methods to NSString
  • Next by Date: Re: Adding methods to NSString
  • Previous by thread: Re: intercepting f-key
  • Next by thread: [ANN] iList 1.5 beta 1
  • Index(es):
    • Date
    • Thread