Re: Using UserDefaults properly
Re: Using UserDefaults properly
- Subject: Re: Using UserDefaults properly
- From: Ryan Britton <email@hidden>
- Date: Fri, 8 Sep 2006 20:28:28 -0700
The common location for storing this kind of thing is inside ~/
Library/Application Support/YourApp. You could create a storage file
there to store all of the common settings, possibly using Core Data
store.
On Sep 8, 2006, at 8:23 PM, Keith Penrod wrote:
I'm writing a basic program to keep track of your budget, and as
part of that I want to have a list of categories (like Car
expenses, Groceries, etc.) that the user can define and modify.
But, since the user wouldn't want to re-enter this list of
categories each time a new document is created, I would like to
store the list of categories somewhere "shared." What I have done--
that works--is just store an NSDictionary with the information in
the standardUserDefaults, using NSUserDefaults. However, since
this isn't technically a "prefence" kind of thing, I don't think
that's where I should store it. Would there be a better way? I
mean, I wouldn't want to create a file that's outside of the
packaged app, since the user might see it and delete it, thinking
it's an erroneous file. Is there a way to save to a file and make
sure that it's either invisible to the user or inside the package
with the app?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden