Re: NSUserDefauts - Am I Missing the Obvious?
Re: NSUserDefauts - Am I Missing the Obvious?
- Subject: Re: NSUserDefauts - Am I Missing the Obvious?
- From: j o a r <email@hidden>
- Date: Thu, 19 Dec 2002 13:45:48 +0100
The names you see reflect the "CFBundleIdentifier" key of your product
target in Project Builder. If this key is not set, the application name
will be used instead.
You want to ensure that no other application will attempt to store
preferences under the same name as you, and one easy way to acomplish
that is to tag it using your company url "Java-style" [1].
Also, keep in mind that this is just an identifier - not intended for
human consumption, so it shouldn't matter all that much if it's easy to
read or not, as long as it serves it's purpose well (i.e. to provide an
unique identifier).
j o a r
[1] That it's "backwards" is simply because it's hierarchial data (the
.com domain has a lot of subdomains, which in turn has a lot of
subdomains, e.t.c.), and hierarchial data is best specified from root
-> leaf.
Think of how a date is specified using international standards
(simplified):
2002-12-19 13:40
Or a path:
/Users/joar/Documents/...
It wouldn't make much sense to present it in any other way.
On Thursday, Dec 19, 2002, at 12:55 Europe/Stockholm, Angela Brett
wrote:
I had noticed that names of most preferences files look like reversed
domain names, but I've often wondered if this was just a coincidence
or if they really are supposed to be reversed domain names. If they're
supposed to be domain names, why? What if I don't have one? Most of
them seem to be com.companyname.appname and something like
nz.co.cocoa.myapp (rather than com.) seems kind of weird. I didn't
want to use such a funny looking identifier without finding out for
sure whether it's meant to be a backwards domain name and why.
I can think of one reason - that it goes from the general to the
specific which means the files are grouped nicely when alphabetically
sorted - but the com or nz.co bit doesn't really add anything useful
to that. There's nothing useful in grouping apps by country,
especially since the .coms come from all over the place anyway.
_______________________________________________
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.