In my case, I deployed a Preferences file via MDM tool which called Intune to my Mac. And then, the system created a file named "com.mycompany.test.plist" in "/Library/Managed Preferences" folder.
I searched from Google, there are many discussion about using NSUserDefaults API to get these configuration values, for example: https://developer.apple.com/forums/thread/127039
I also create a app with Xcode and it's bundle id is also "com.mycompany.test.plist", but the result is nil, method is as follows: NSDictionary *serverConfig = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"com.apple.configuration.managed"];
Any one can tell me how to get the configurations? or is there something wrong with my understanding?