Is it not possible to write to the user preference folder in Mojave?
Bob Sneidar
bobsneidar at iotecdigital.com
Tue Oct 30 11:57:01 EDT 2018
Of course asking end users to change permissions on folders is pretty much a non-starter.
Bob S
> On Oct 30, 2018, at 07:28 , Sean Cole (Pi) via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Hi Matthias,
> This is, without any doubt, a permissions issue and definitely nothing to
> do with sandboxing. You need to unlock the folder you are saving to. The
> recommended form is to have a folder within the preferences folder named
> [domain].[appName] (ie, com.mycompany.myapp), and store your prefs files in
> there. But you need to make sure that the permissions for both the main
> Preferences folder and your app prefs folder are set to read/write for
> either 'admin' AND/OR 'user'. Check also the permissions for the pref file
> itself.
>
> The Apple Dev Docs say this about the /Library/Preferences/ folder:
>
>> You should not create files in this directory yourself. Instead, use the
>> NSUserDefaults class or CFPreferences API to get and set preference values
>> for your app.
>
> Use of NSUserDefaults has not yet been set up for LC apps. You should be
> okay to write there as long as the permissions are correct. You may have to
> use a terminal command to find out for sure what the permissions are or to
> change them using chmod or something.
>
> All the best
>
> Sean
More information about the use-livecode
mailing list