(linking lockdownd) |
(Fix MGGetBoolAnswer example) |
||
Line 15: | Line 15: | ||
// CFBooleanRef MGGetBoolAnswer(CFStringRef string); | // CFBooleanRef MGGetBoolAnswer(CFStringRef string); | ||
CFBooleanRef value = MGGetBoolAnswer(CFSTR("UIProceduralWallpaperCapability")); | CFBooleanRef value = MGGetBoolAnswer(CFSTR("UIProceduralWallpaperCapability")); | ||
NSLog(@"Value: % | NSLog(@"Value: %@", (id)value); | ||
CFRelease(value); | CFRelease(value); | ||
</source> | </source> | ||
*'''Note''': You are responsible for freeing the value returned by MGCopyAnswer and MGGetBoolAnswer. | *'''Note''': You are responsible for freeing the value returned by MGCopyAnswer and MGGetBoolAnswer. | ||
== References == | == References == | ||
* Header: https://github.com/Cykey/ios-reversed-headers/blob/master/MobileGestalt/MobileGestalt.h | * Header: https://github.com/Cykey/ios-reversed-headers/blob/master/MobileGestalt/MobileGestalt.h |
Revision as of 22:49, 1 November 2014
libMobileGestalt is a library that can be used to get various system values such as the UDID, disk usage, device version and much more. It is comparable to liblockdown.dylib. See also lockdownd.
MGCopyAnswer
// Common form: MGCopyAnswer(CFStringRef string);
CFStringRef value = MGCopyAnswer(kMGDeviceColor);
NSLog(@"Value: %@", value);
CFRelease(value);
MGGetBoolAnswer (iOS 7+)
// CFBooleanRef MGGetBoolAnswer(CFStringRef string);
CFBooleanRef value = MGGetBoolAnswer(CFSTR("UIProceduralWallpaperCapability"));
NSLog(@"Value: %@", (id)value);
CFRelease(value);
- Note: You are responsible for freeing the value returned by MGCopyAnswer and MGGetBoolAnswer.
References