Re: UserDefaults and domain names
Re: UserDefaults and domain names
- Subject: Re: UserDefaults and domain names
- From: Douglas Davidson <email@hidden>
- Date: Thu, 19 Jul 2001 12:42:39 -0700
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?
You need to give your bundle a CFBundleIdentifier of the appropriate
form. See the InfoPlist release note for more details on various info
dictionary keys. In ProjectBuilder, you go to the pane where you set
up the info dictionary keys, and set the value com.whidbeysoft.FileView
for the CFBundleIdentifier key. Really, all bundles should have a
CFBundleIdentifier; the bundle name is used only as a fallback if it is
not present.
Douglas Davidson