• 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: Finding an App by file id?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding an App by file id?


  • Subject: Re: Finding an App by file id?
  • From: Greg Robbins <email@hidden>
  • Date: Sat, 15 Mar 2003 20:32:08 -0800

Is there a way in Cocoa to find an app by its file id?

You mean by its signature; file id means something else on HFS volumes.

Try this to get the FSRef and the CFURL for the application from its signature using Launch Services:

OSType signature = 'sfri';
FSRef appRef;
NSURL *appURL;
OSStatus err = LSFindApplicationForInfo(signature, NULL, NULL,
&appRef, (CFURLRef*) &appURL);
if (err == noErr)
{
[appURL autorelease];

// examine it with NSLog(@"%@", [appURL absoluteString]);
}
_______________________________________________
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: 
 >Finding an App by file id? (From: Rams <email@hidden>)

  • Prev by Date: NSString array to -> char**
  • Next by Date: Re: NSString array to -> char**
  • Previous by thread: Finding an App by file id?
  • Next by thread: Re: Finding an App by file id?
  • Index(es):
    • Date
    • Thread