libMobileGestalt.dylib

From iPhone Development Wiki
Revision as of 12:41, 16 January 2014 by PoomSmart (talk | contribs) (MGGetBoolAnswer(CFStringRef);)
Jump to: navigation, search


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.

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: %i", value);
CFRelease(value);
  • Note: You are responsible for freeing the value returned by MGCopyAnswer and MGGetBoolAnswer.

References