Jump to content


App Management key/value pair

app management key/value distribution

  • Please log in to reply
1 reply to this topic

#1 Sean-Ryan Sullivan

Sean-Ryan Sullivan
  • Members
  • 21 posts
  • LocationDillsburg, PA

Posted 05 February 2016 - 08:19 AM

I see there is a field in the app management that allows for key/value pairs to be added to apps so that certain settings can be rolled out along with the apps.  I am curious as to what the format should be when entering these key/value pairs.  I have an app dev  that informed me of a key/string that I can use but it seems to not be pushing out with the app.  Is there a way these need to be formatted such as to be encapsulated in quotes?

#2 Joseph Totaro

Joseph Totaro
  • Moderators
  • 24 posts

Posted 05 February 2016 - 05:49 PM

From the mdm side there are no special formatting requirements for the key/value pairs.  Can you check with your developer to ensure the app is attempting to read the variables correctly?  Here's some sample code for reading a key named username 

NSDictionary *managedConfiguration = [[NSUserDefaults standardUserDefaults] 
NSString *username = [managedConfiguration objectForKey:@"username"];
if (username) {
    //  If the username is not null, the server has pushed a managed
    //  configuration with a username parameter and you can autofill
    //  or do what you need to do with it. You may want to make sure
    //  the parameter is not an empty string as well.