0

I am trying to read values stored from other application but I couldnt figure it out yet. Then I came across this answer which says its not possible. But I am trying to get values from Preferences Pane app to my own application.

If its not possible to read values using NSUserDefaults how should can these two communicate with each other(pref pane and a cocoa app) ?

EDIT: I also tried

NSUserDefaults *userDef = [NSUserDefaults standardUserDefaults];
[userDef addSuiteNamed:@"com.foobar.pref"];
NSString *settingValue = [userDef stringForKey:@"settingValue"]; // returns nil
Community
  • 1
  • 1
user88975
  • 1,618
  • 3
  • 19
  • 29

1 Answers1

0

The answer you found saying it's not possible was for iOS, not OS X.

I'm not sure if it is possible using NSUserDefaults, but you could certainly do it using CFPreferencesSetAppValue and CFPreferencesCopyAppValue.

JWWalker
  • 22,385
  • 6
  • 55
  • 76