Re: Bundle identifiers - solution!
Re: Bundle identifiers - solution!
- Subject: Re: Bundle identifiers - solution!
- From: email@hidden
- Date: Sat, 11 May 2002 22:45:15 +0200
On samedi, mai 11, 2002, at 10:21 , Charles Srstka wrote:
Never mind my previous post! Your question got me curious, so I took
another look. Turns out there is an API that I missed last time I
scanned the LaunchServices docs, and it does just what you want. Here's
some sample code I wrote, that works:
char *wildcard = "****";
NSURL *url;
LSFindApplicationForInfo((OSType)(*wildcard),(CFStringRef)@"com.apple.mail"
,NULL,NULL,(CFURLRef *)(&url));
NSLog([url path]);
Running this gets the path to Mail.app. You need to add
ApplicationServices.framework to your project. You don't need to include
any headers - they're apparently automatically imported by Cocoa.
Just check that this is working even when the application has never been
launched.
_______________________________________________
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.