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

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


Hi Matthias,
The quote from Apple was in reference to the Library/Preferences folder in
the User directory, not the one in the root. To make it even more
abundantly clear this is what was meant, this page specifically references
~/...
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html

This is definitely a permissions issue. Resolve the permissions problem
(despite Bobs 'non-starter' comment), and your client can start using your
app again. The fact it works on your machine and clean VMs shows that it is
specific to his system and needs fixing.

Trevors link is exceptionally helpful. Big thumbs up. We could do with that
in the main app in the iOS standalone settings.

All the best to you all.

Sean

On Tue, 30 Oct 2018 at 18:12, Trevor DeVore via use-livecode <
use-livecode at lists.runrev.com> wrote:

> >
> > 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.
> >
>
> Levure has a Preferences Helper that uses NSUserDefaults through an LCB
> file in LC9 and an external in versions prior to LC9.
>
> For those lucky souls using Levure you just have to activate the helper in
> your project file. Others could grab the helper files from the Levure repo
> and work them into their own project.
>
>
> https://github.com/trevordevore/levure/tree/develop/framework/helpers/preferences
>
> --
> Trevor DeVore
> ScreenSteps
> www.screensteps.com
> _______________________________________________
> 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