Re: Bundle identifiers - solution!
Re: Bundle identifiers - solution!
- Subject: Re: Bundle identifiers - solution!
- From: Simon Jacquier <email@hidden>
- Date: Sat, 11 May 2002 22:49:32 +0200
Charles Srstka <email@hidden> wrote:
>
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.
There is an issue with that code.
If you use it to get the path to a program that is not installed (i.e. a
program that is not part of the default Mac OS X installation, or that as
been deleted by the user) your application will crash. At least the test app
I just built does.
Simon
--
Simon Jacquier
http://homepage.mac.com/jacksim/software/
http://www.macgeneration.com/
_______________________________________________
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.