Author Topic: Support for macOS Managed Preferences  (Read 4928 times)

Offline Kevin M. Cox

  • Hero Member
  • *****
  • Posts: 544
  • PM 2024.10 (8173) | macOS 15.1
    • View Profile
    • Kevin M. Cox | Photojournalist
Support for macOS Managed Preferences
« on: March 14, 2019, 02:09:14 PM »
I'd really like to see support for Managed Preferences via Configuration Profiles on macOS. While I understand this would be of no benefit to home / individual users, in a corporate environment it is very important and a majority of applications support them.

Configuration Profiles (.mobileconfig) deployed manually, via management application or MDM server allow individual preferences to be locked to specific values/options and not changed by the end user.

The perfect example for this is the IPTC/XMP preferences. A large organization such as a newspaper or magazine will want all photographers using the same settings to ensure that all photos submitted have metadata embedded the same way. By configuring and enforcing these settings with a profile it prevents a user from accidentally or intentionally changing these settings while still allowing them to customize other non-managed options.

https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFPreferences/CFPreferences.html#//apple_ref/doc/uid/10000129i

https://developer.apple.com/documentation/corefoundation/preferences_utilities
Kevin M. Cox | Photojournalist
https://www.instagram.com/kevin.m.cox/

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Support for macOS Managed Preferences
« Reply #1 on: March 14, 2019, 04:32:40 PM »
Kevin,

We used to use CFPreferences on macOS.  They're horribly slow so we had to go with our own implementation.

We have a way to share preferences via the Export and Import buttons in the Preferences dialog.  You can export just what you want and nothing else by selecting only the items you care about (IPTC/XMP related entries.)

-Kirk

Offline Kevin M. Cox

  • Hero Member
  • *****
  • Posts: 544
  • PM 2024.10 (8173) | macOS 15.1
    • View Profile
    • Kevin M. Cox | Photojournalist
Re: Support for macOS Managed Preferences
« Reply #2 on: March 17, 2019, 05:22:40 PM »
I assumed this would be a tough sell.

I'm curious what about CFPreferences were slow?

Sharing them isn't so much important as enforcing them. The benefit of setting them automatically is a bonus.

I assume there isn't a way to programmatically Import settings from disk via the command line?
Kevin M. Cox | Photojournalist
https://www.instagram.com/kevin.m.cox/

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Support for macOS Managed Preferences
« Reply #3 on: March 17, 2019, 07:54:40 PM »
Kevin,

I assumed this would be a tough sell.

I'm curious what about CFPreferences were slow?

They didn't support updating one preference without rewriting the entire file.  That is slow when you've got a lot of preferences.

Sharing them isn't so much important as enforcing them. The benefit of setting them automatically is a bonus.

I assume there isn't a way to programmatically Import settings from disk via the command line?

No, but that could be added as long as it simply means that everything in the exported preferences file is imported.  Otherwise you'd need a UI to select what parts you want to keep and what parts you want to discard.

-Kirk

Offline Kevin M. Cox

  • Hero Member
  • *****
  • Posts: 544
  • PM 2024.10 (8173) | macOS 15.1
    • View Profile
    • Kevin M. Cox | Photojournalist
Re: Support for macOS Managed Preferences
« Reply #4 on: March 18, 2019, 08:19:09 AM »
No, but that could be added as long as it simply means that everything in the exported preferences file is imported.  Otherwise you'd need a UI to select what parts you want to keep and what parts you want to discard.

That could work. I could drop the exported preference file on disk and then use the command line to automatically have it load that file and change/revert those specific settings that are included. This wouldn't be as good as simply enforcing them but if I re-load them with every update of PM if makes sure they stay mostly in sync between users.
Kevin M. Cox | Photojournalist
https://www.instagram.com/kevin.m.cox/