Where do you save preferences?
Richard Gaskin
ambassador at fourthworld.com
Mon Jun 18 15:26:14 EDT 2012
Peter Haworth wrote:
> I don't know what the deal is with the HIG but the guidelines for the MAS
> make it very clear that if your app writes to any location other than the
> sanctioned ones, the app will be rejected. So as far as MAS is concerned,
> you can't write to the Preferences folder, doesn't matter what method you
> use.
It seems the difference lies in what the definition of "writing a file" is.
The Preferences folder hasn't gone away. Indeed Apple's own apps, and a
great many in the MAS, continue to use it as described in the HIG.
What's new is that your app doesn't "write" there per se. Apple is now
requiring that the OS write there on your behalf, using either the
theNSUserDefaults Cocoa class or the CFPreferences API.
At face value this seems silly, since of course being able to write a
file to a given location isn't exactly rocket science truly requiring
OS-level support.
The Preferences folder has been faithfully used in conformance with
Apple's guidelines since the earliest days of the platform, and since
they continue to use it themselves there doesn't seem to be much of a
problem with regard to "consistency of the user experience".
In fact, using the Application Support folder for what their HIG says
should be in the Preferences folder is far *less* consistent with what
users have come to expect about where prefs are stored.
All this boils down to:
Why does Apple feels the need to wrest control of the preferences file
format away from app developers?
...which raises other questions, like:
Exactly how is this any sort of user benefit, while the Application
Support folder remains available for an app to do with as they please?
Will they shut down the Application Support folder too?
Will they eventually forbid all custom file formats, limiting devs to
using Cocoa to write all files?
...and perhaps the simplest question of all:
Why don't they just assign our app a folder in Prefs and let us use our
own formats there?
Ah, the mysteries of Apple.
"If it's Tuesday it must be a new SDK license requirement...."
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
Follow me on Twitter: http://twitter.com/FourthWorldSys
More information about the use-livecode
mailing list