• 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: Find app by signature
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find app by signature


  • Subject: Re: Find app by signature
  • From: Greg Robbins <email@hidden>
  • Date: Mon, 31 Mar 2003 14:04:00 -0800

At 4:25 PM -0500 3/31/03, Steve Roy wrote:
I'm looking at NSWorkspace hoping to find a method to locate an application
given its 4-byte signature (creator code).

Use LSGetApplicationForInfo, from LaunchServices.h, to get the FSRef for the application given its OSType signature:

const OSType kAnyFileType = kLSUnknownType;
const CFStringRef kAnyExtension = NULL;
CFURLRef* kDontWantURL = NULL;
FSRef appFSRef;

OSStatus err = LSGetApplicationForInfo(kAnyFileType, signature, kAnyExtension, kLSRolesAll, &appFSRef, kDontWantURL);

You can use CFURLCreateFromFSRef to make an NSURL from the FSRef.

Greg Robbins
_______________________________________________
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.

  • Follow-Ups:
    • Re: Find app by signature
      • From: Vince DeMarco <email@hidden>
  • Prev by Date: Find app by signature
  • Next by Date: Preload compiled AppleScript?
  • Previous by thread: Find app by signature
  • Next by thread: Re: Find app by signature
  • Index(es):
    • Date
    • Thread