• 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: Creating a Bundle via Code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a Bundle via Code


  • Subject: Re: Creating a Bundle via Code
  • From: Ken Thomases <email@hidden>
  • Date: Fri, 20 Jun 2008 17:16:36 -0500

On Jun 20, 2008, at 4:43 PM, Grant Limberg wrote:

Is there a way to create a new bundle from in Cocoa?

What I'd like to do is have a bundle in my app's Application Support folder to store some data generated by the user in my app.

Since it's just data, I think you want a package rather than a bundle, as such. A package is a directory which the Finder and other system GUI presents to the user as a file.



Do I simply just create a folder and set a bit on it that the OS identifies as being a bundle or is there anything else special I have to do?

Sort of. You don't set a bit on the folder. You declare a document type in your application's Info.plist. That document type would specify your custom folder name extension and indicate that it's a package document type. This informs Launch Services (and the Finder, which relies on LS) that the folder is a package.


See the Bundle Programming Guide. In particular, see the chapter on "Document Packages", but don't limit yourself to that chapter.

http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/
http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/Concepts/DocumentBundles.html

Cheers,
Ken
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Creating a Bundle via Code (From: Grant Limberg <email@hidden>)

  • Prev by Date: Re: install_name_tool
  • Next by Date: Re: Creating a Bundle via Code
  • Previous by thread: Creating a Bundle via Code
  • Next by thread: Re: Creating a Bundle via Code
  • Index(es):
    • Date
    • Thread