Tobonaut Tobonaut - 1 year ago 73
Objective-C Question

"defaults read" as Objective C method

I try to read the plist / xml file which is behind the terminal commando:

defaults read

I tried
without success. Maybe you can help me. Thanks.

Answer Source

You can use CFPreferences, for example

CFStringRef orient = (CFStringRef) CFPreferencesCopyAppValue( CFSTR("orientation"), CFSTR("") );
Boolean hidesIsValid = false;
Boolean hides = CFPreferencesGetAppBooleanValue( CFSTR("autohide"), CFSTR(""), &hidesIsValid );
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download