Re: Creating a Bundle via Code
Re: Creating a Bundle via Code
- Subject: Re: Creating a Bundle via Code
- From: Matt Long <email@hidden>
- Date: Fri, 20 Jun 2008 16:22:53 -0600
This might help: http://www.cimgf.com/2008/05/13/from-hacker-to-microisv-custom-file-formats/
In essence you create a folder and set attributes on it as you
suspected. Though these are referred to as packages instead of
bundles. Take a look at NSFileManager. You can create a directory that
hides the file extension. You then have your open and save panels
treat the file as a single file rather than a directory. You can also
register a file extension with the OS so that when the file/bundle is
double clicked it will open in your app.
Not sure if that's exactly what you wanted, but I'm not sure your
storing user generated data this way in the Application Support folder
is the best approach either. You probably want to support saving to
files or use Core Data instead if you don't want custom file formats.
-Matt
On Jun 20, 2008, at 3: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. I see
plenty of methods to call to load bundles and check if a folder is a
bundle, but not creating them.
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?
Thanks in advance,
Grant Limberg
email@hidden
LinkedIn: http://www.linkedin.com/in/grantlimberg
http://www.glsoftware.net
_______________________________________________
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
_______________________________________________
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