Re: Error -10827 from Launch Services
Re: Error -10827 from Launch Services
- Subject: Re: Error -10827 from Launch Services
- From: Rob Minnis <email@hidden>
- Date: Tue, 20 Jan 2004 12:19:03 -0600
In case anyone was wondering, it looks like the problem is that LS
cannot launch an application that resides in a sub-framework:
MainApplication.app
Frameworks
SomeFramework.framework
Resources
SecondApplication.app
It doesn't matter what application I use for SecondApplication.app
(including a renamed copy of Text Edit), the same error occurs. And,
simply moving SecondApplication.app to the Resources folder of
MainApplication.app allowed it to launch correctly.
So, is this a known limitation or bug report fodder?
TIA,
Rob Minnis
email@hidden
On Jan 12, 2004, at 10:24 AM, Rob Minnis wrote:
Does anyone know what error -10827 means? I'm trying to launch an
application but, after getting the URL, Launch Services always (or,
almost always) returns this error code.
After receiving this error, I cannot launch the application at all:
even from the Finder. The Finder complains that the app may be damaged
or incomplete but, as far as I can tell, the only differences between
the trashed copy and a fresh copy is the .DS_Store files.
TIA,
Rob Minnis
email@hidden
====================
For testing, this code is called immediately upon application launch
(i.e. main()). In the few cases where it does work, the code is called
after the application is completely launched (NSApplication has
performed it's voodoo) but it can only be called once (after the first
time, the GetBundle() call fails.
CFBundleRef mainBundle =
CFBundleGetBundleWithIdentifier(CFSTR("us.minnis.BugReporter"));
if(mainBundle != NULL)
{
CFURLRef bundleURL = CFBundleCopyResourceURL(mainBundle, CFSTR("Bug
Reporter.app"), NULL, NULL);
if(bundleURL != NULL)
{
LSLaunchURLSpec spec = {bundleURL, NULL, NULL,
kLSLaunchDontAddToRecents, NULL};
OSStatus status = LSOpenFromURLSpec(&spec, NULL);
if(status == noErr) return;
}
}
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
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.