|
|
Making apps multi-user aware
|
|
|
|
Forum Regular
Join Date: Oct 1999
Location: Baltimore, MD
Status:
Offline
|
|
I'm working on an OS X application in Cocoa and I would like to make this application multi-user aware. In other words, I want the preferences to be saved for each user in a location that only that particular user can access. Obviously, I assume this is under the home directory.
Is there a document by Apple that describes HOW this should be done - guidelines? I can't seem to find one on the developer site.
Any info would be great.
Thanks!
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Apr 2000
Location: San Francisco, CA
Status:
Offline
|
|
Originally posted by ruttopia:
<STRONG>I'm working on an OS X application in Cocoa and I would like to make this application multi-user aware. In other words, I want the preferences to be saved for each user in a location that only that particular user can access. Obviously, I assume this is under the home directory.
Is there a document by Apple that describes HOW this should be done - guidelines? I can't seem to find one on the developer site.
Any info would be great.
Thanks!</STRONG>
Check out the CFPreferences API. If you want a custom binary format for your preferences, use the Folder Manger to locate the User preference file.
|
--
Michael F. Kamprath
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status:
Offline
|
|
Luckily for you that is the way that it works by default. Just use NSUserDefaults and that will write a file with your bundle identifier (ie com.address.program) in their ~/Library/Preferences/ directory. Of course you can also make any paths you manually define relative to the current user's home by using NSString's stringByExpandingTildeInPath.
Hope that is what you were looking for,
Jeff.
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Oct 1999
Location: Baltimore, MD
Status:
Offline
|
|
Both posts helpful - thanks!!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|