• 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
Re: Bundle identifiers - solution!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Bundle identifiers - solution! (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: How to implement drag-drop onto application icon
  • Next by Date: Re: Bundle identifiers - solution!
  • Previous by thread: Re: Bundle identifiers - solution!
  • Next by thread: Re: Bundle identifiers
  • Index(es):
    • Date
    • Thread