Applications for all users on MAC OS X 10.8

In MAC OS 10.8.x, is it possible that the application can store global settings (i.e. this applies to all users) without resorting to using an auxiliary tool (for example, SMJobBless)?

I tried to write to the application package, tried to find R / W for the location by all users, without any luck in both attempts.

What else can I try?

+4
source share
1 answer

Leaving this answer here, but it may not work for you, since you most likely need privileged access to call CFPreferencesSetValue() . It has been several years since I made one of them.

If you do not need this feature to work with the sandbox, then the desired tool is the lower-level preference interface, CFPreferences . In particular, you can use CFPreferencesSetValue() and CFPreferencesCopyValue() together with kCFPreferencesAnyUser .

It is possible that this will work for isolated applications, but I have not tried. According to the "Settings and Settings Guide" in the "Managing Settings Using Core Foundation" section:

Writing applications outside the application domain is not possible for applications installed in the sandbox.

This hints that this is legal as it is in the application domain. But it is entirely possible that application sandboxes will write this application domain preference in the sandbox for each user, so this will not work. You must try.

+2
source

All Articles