• 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: Identifying if a bundle is an app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying if a bundle is an app


  • Subject: Re: Identifying if a bundle is an app
  • From: Chris Hanson <email@hidden>
  • Date: Fri, 2 Jan 2004 15:48:49 -0600

On Jan 2, 2004, at 1:21 PM, Jesus De Meyer wrote:
I've been looking for a way to indetify if a bundle is an application but haven't found anything. First I though about checking for the .app suffix, but I have apps that don't have an extension. I also can't check for the creator type as bundles show up as directories.

You can use Launch Services to do this. Use LSCopyItemInfoForRef to get all flags for an item, and then check its kLSItemInfoIsApplication bit in the resulting LSItemInfoRecord. The function, flag, and structure definitions for this are in <LaunchServices/LSInfo.h> within the ApplicationServices umbrella framework.

It'd be useful if -[NSFileManager fileAttributesAtPath:traverseLink:] would return this information...

-- Chris

--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
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: 
 >Identifying if a bundle is an app (From: Jesus De Meyer <email@hidden>)

  • Prev by Date: Is Merge Malfunctioning?
  • Next by Date: Re: Localization question
  • Previous by thread: Identifying if a bundle is an app
  • Next by thread: Re: Identifying if a bundle is an app
  • Index(es):
    • Date
    • Thread