Is it not possible to write to the user preference folder in Mojave?

Sean Cole (Pi) sean at pidigital.co.uk
Tue Oct 30 10:28:36 EDT 2018


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


On Tue, 30 Oct 2018 at 11:36, Matthias Rebbe via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Tried here now with a standard  user and an admin account.
> It works with both account types  w/o problems.
>
> I will have to contact the customer again.  A big problem is that he´s
> Italian and does not speak english. At least his first emails were in
> Italian unless i mentioned that i had to translate his email to English and
> also my answer to Italian with Google Translate. After that he used Google
> Translate also.
>
> I just can hope, that Google does its job good and i do not send offending
> messages to him. ;)
>
> Regards,
> Matthias
>
>
> Matthias Rebbe
>
> free tools for Livecoders:
> https://instamaker.dermattes.de
> https://winsignhelper.dermattes.de
>
> > Am 30.10.2018 um 00:09 schrieb Bob Sneidar via use-livecode <
> use-livecode at lists.runrev.com>:
> >
> > I wonder if they are looged in as administrators?
> >
> > Bob S
> >
> >
> >> On Oct 29, 2018, at 16:05 , Matthias Rebbe via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >>
> >> I´ve setup a VM with Mojave and my app was able to write the
> registration data to the preferences folder without a problem.
> >>
> >> So i am not sure what´s going on  on the machine of the customer. But
> at least i know now that my app is able to access that folder.
> >>
> >> Regards
> >>
> >> Matthias Rebbe
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com <mailto: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>
> _______________________________________________
> 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



More information about the use-livecode mailing list