Vlad
Hi Vlad,
So glad to hear you think this is a great idea to support and add to this wonderful project!
Shouldn't need to be specific to any MDM solution, as to my knowledge, they all use the same core functionality of a .mobileconfig file or plist's in MacOS to support this. I just happen to be familiar with Intune from work and my home lab, and I know it supports .mobileconfig or .plist formats. I believe JAMF is the same for support requirements, and is highly popular for an Apple MDM solution, with Microsoft's Intune being another major player. My understanding is a lot of organizations who are using Microsoft 365, with a mix of Windows and Mac, will potentially be using Microsoft's Intune MDM solution since it works well on Windows and fairly well on Mac.
I'm not a developer so i'm not overly sure how exactly to code in support for this to the browser, however, I came across this and wonder if it would be helpful to share as a way to support this kind of set up? I'll do some digging to contribute and see what I can find, and perhaps confer with a friend of mine who is a developer and might be of help to find where this support comes from / how to add it to applications.
I'd be more than happy to help with this effort however I can, whether that is being a tester with my Intune MDM setups, or anything I can help with as a non-developer.
https://developer.apple.com/forums/thread/654183
Your application should use CFPreferencesCopyAppValue() to read in the managed preference installed by your configuration profile payload. The preference domain will be the PayloadType key value and your keys are placed into the payload dictionary (at the same level as the EnterprisePoliciesEnabled key in your Firefox example). Once you install the profile, the keys should show up in /Library/Managed Preferences/<username>/<bundle ID>.plist. Note that the <username> folder isn’t used for device level profiles. CoreFoundation will automatically pick up the managed preferences once you install the profile, as long as you use CFPreferencesCopyAppValue or NSUserDefaults to access the preference keys.
EDIT: My friend suggests the above paste from apple developer website sounds right for this kind of request and to add managed preferences to an app.
Also, maybe some examples here from Chromium? https://chromium.googlesource.com/chromium/src/+/8364870098c3eaccb816fd78855d2a390911702e/chrome/browser/app_controller_mac.mm
I should also add - it doesn’t have to be created through iMazing or software. As long as managed preferences / plist / mobileconfig are supported, then it’s possible to add support to iMazing or other software to generate the config files.
https://imazing.com/guides/imazing-profile-editor-working-with-custom-preference-manifests