Re: UserDefaults and domain names
Re: UserDefaults and domain names
- Subject: Re: UserDefaults and domain names
- From: Tom Waters <email@hidden>
- Date: Thu, 19 Jul 2001 12:44:30 -0700
I have a suggestion for the documentation, which currently reads as
follows:
"Application Domain
The application domain contains application-specific defaults that are
read from a user's defaults database. The application domain is
identified by the bundle identifier of the application."
Maybe it would be helpful if it was amended to say:
"The bundle identifier of your application may be set by using the
Expert Build settings in Project builder and adding a key named
CFBundleIdentifier, with the value being your new domain name."
It might also be good if apple would explain their use of reverse domain
names in user defaults. I have a few dozen apps (including my own prior
to learning this) that don't do it. If everyone did this right, we
could have a nice hierarchical defaults viewer application.
On Thursday, July 19, 2001, at 12:09 PM, Tom Waters wrote:
>
I'm working on the user defaults mechanism in my app and I noticed that
>
many applications use a reverse fully qualified domain name, similar to
>
the java package convention.
>
>
For example, com.apple.TextEdit, or com.microsoft.explorer...
>
>
My read of the NSUserDefaults docs indicated that it uses the bundle's
>
name for the domain name, thus mine is coming out just plain FileView,
>
rather than com.whidbeysoft.FileView.
>
>
Can someone tell me how to set my own fully qualified domain name in
>
the user defaults?