react-native-user-defaults icon indicating copy to clipboard operation
react-native-user-defaults copied to clipboard

Get fail for key: com.apple.configuration.managed

Open montehansen opened this issue 8 years ago • 3 comments
trafficstars

I am using a well-known managed app configuration key (com.apple.configuration.managed) for an Enterprise Application. I have verified that my MDM has pushed down the user defaults to the device.

Any ideas/thoughts?

Thanks,

Monte

  var callback = function ( something )
  {
     // results in: Get fail for key: com.apple.configuration.managed
     console.log("Callback: " + something);
  };

  userDefaults.get( "com.apple.configuration.managed", null /*"Environment"*/, callback )
  .then(data =>
  {
    console.log("SUCCESS: " + data);
  });

react-native-cli: 1.2.0 react-native: 0.38.0

montehansen avatar Dec 04 '16 19:12 montehansen

Get fail for key: com.apple.configuration.managed is there error reported by the userDefaults class.

montehansen avatar Dec 16 '16 21:12 montehansen

For those with the same problem as me, I ended up switching to the react-native-userdefaults-ios project, which had no trouble reading from a managed app configuration key.

montehansen avatar Dec 17 '16 00:12 montehansen

Hi @montehansen , I know this is long time ago, but do you mind to share with me how did you read the mdm config using react-native-userdefaults-ios, I tried and it is returning null for me, also, how did you verify that the key has been pushed to user defaults in the device, is that possible all see all the user defaults using react-native? thanks

yuxiaoma avatar May 10 '18 21:05 yuxiaoma