Where do you save preferences?

Peter Haworth pete at lcsql.com
Sun Jun 17 12:24:00 EDT 2012


Hi Richard,
It seems that the HIG and the Mac App Store requirements are at odds for
some reason.  Here's what the OS X Developer Library "Submitting To The App
Store" document has to say.  Note there's no mention of the Preferences
folder.


   -

   *Your application may write to the following directories:*
   -

      *~/Library/Application Support/<app-identifier>*
      -

      *~/Library/<app-identifier>*
      -

      *~/Library/Caches/<app-identifier>*

   *where <app-identifier> is your application's bundle identifier, its
   name, or your company’s name. This must exactly match what is in iTunes
   Connect for the application*

An application can also write to the ~/Pictures, ~/Movies, and ~/Music
folders and any directory that the user expicilty requests in a Save dialog.

I haven't personally submitted to the App store but I've been told by
people that have that their app was refused beacuse they weren't adhering
to the above requirements.

Why Apple should suddenly decide it's not OK to write preferences files to
the Preferences folder is beyond me, maybe these locations are more in line
with how things work on iPhone/iPad?

Of course, if you're not planning on submitting to the MAS, then I imagine
there's nothing to stop you following the HIG.

Pete
lcSQL Software <http://www.lcsql.com>



On Sat, Jun 16, 2012 at 5:20 PM, Richard Gaskin
<ambassador at fourthworld.com>wrote:

> Peter Haworth wrote:
>
>> Surprisingly, the Mac App Store will get rejected if you put stuff in the
>> users home/Preferences folder.
>>
>
> I believe the difference there is installation vs. runtime.
>
> The OS X HIG clearly notes that files in the Preferences folder is for
> user-generated data.  As such, your app should never need to install
> anything there, but of course will need to write there at runtime when the
> user makes changes in your app's Preferences window.
>
> If you need to install data for your app in a user-writable folder, the
> HIG suggests using the Application Data folder for that.
>
> In short, the Preferences folder is the same as it's always been, with the
> Application Support folder also available for non-user-generated data.
>  AFAIK, the only difference now is that Apple is finally enforcing the
> guidelines they've been publishing for the last decade.
>
> --
>  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<http://twitter.com/FourthWorldSys>
>
>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>



More information about the Use-livecode mailing list