Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preference file for all the users



/Library/Application Support was mentioned. There's also CFPreferences support for non per-user preferences (which may not be directly exposed in NSUserDefaults...)

However, you really ought to think hard about this. There can be a place for machine-wide preferences and settings for some things, but whenever there's no overriding reason otherwise, preferences should be per-user. Read Bill Bumgarners excellent summary of some of the issues around this from a week or two ago.

You should also keep in mind that, if you have a good reason for non-per-user preferences, you need to be prepared for the user running your app not to have permission to write in /Library. In these cases you need to fail gracefully or give the user opportunity to authenticate as admin (and fail gracefully if they can't/don't).

Mike



Begin forwarded message:

From: Lorenzo Puleo <email@hidden>
Date: Wed Dec 25, 2002 8:50:51 AM US/Pacific
To: Jeff Disher <email@hidden>
Cc: <email@hidden>
Subject: Re: Preference file for all the users

Hi Jeff,
thank you so much.

--
Lorenzo Puleo
mailto:email@hidden

From: Jeff Disher <email@hidden>
Date: Wed, 25 Dec 2002 03:49:49 -0500
To: Lorenzo Puleo <email@hidden>
Cc: <email@hidden>
Subject: Re: Preference file for all the users

This is probably a job for /Library/Application Support. It is a
location that is world rwx (but make sure you double-check the
permissions of any files you create there).

There was much discussion about this folder and its uses a few weeks
ago on this list. Check the archives at cocoa.mamasam.com. The
conversation was popular around december 15-16 so check hits around
that time period.

It started off talking about using this part of the system and later
turned into a discussion about proper behavior of software in a
multi-user system. A good read if you are coming from a Classic Mac or
Windows programming background.

Hope that helps,
Jeff.


On Wednesday, December 25, 2002, at 03:25 AM, Lorenzo Puleo wrote:

Hi,
I use to write the preference file to the
(Home)/Library/Preferences/MyApp.plist
This works for one user only.
Instead I need to write one only preference file for all the users.

Where folder should I write this file in?
Will every user read/write the same Preference file in this directory?

Thank you for helping
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Re: Preference file for all the users (From: Lorenzo Puleo <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.