Configuring a MacOS application using MDM preferences

Hello. I have a MacOS application to be distributed in a .pkg that is signed and notarized.

For the application to work, it needs some settings defined by us (non-secret strings that differ per client). My thought has been to use a .mobileconfig to send these settings using the com.apple.ManagedClient.preferences PayloadType. I can see these settings land correctly into the /Library/Managed Preferences directory (in the correct domain) when distributed using Apple Business Essentials as the MDM. However, I cannot read the settings using NSUserDefaults OR CFPreferences in objective-c (i've tried with my app unsigned and signed, but not signed ant notarized so far). I've seen some posts here and there about managed preferences being deprecated, so I'm not sure if this is my issue or if i'm simply reading the preferences incorrectly. I'll admit the conflict of some of these posts has me a bit confused about how the preferences subsystem works / whether it should be used at all. I'm on MacOS 15.3.

Two questions:

  1. Does anything stand out as to why I wouldn't be able to read these properties?
  2. Is there a better method I should be using to allow sending config via MDM to set application settings?

Thanks in advance!

Can't exactly say why, but this was likely a typo with the bundle id / domain I was using. It works as expected now.

Configuring a MacOS application using MDM preferences
 
 
Q