• 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: 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.
References: 
 >Re: Bundle identifiers - solution! (From: Charles Srstka <email@hidden>)

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