Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
LibMobileGestalt.dylib: Difference between revisions - iPhone Development Wiki

LibMobileGestalt.dylib: Difference between revisions

From iPhone Development Wiki
m (→‎MGGetBoolAnswer (iOS 7+): Corrected type)
Line 19: Line 19:


== References ==
== References ==
* Header: https://github.com/Cykey/ios-reversed-headers/blob/master/MobileGestalt/MobileGestalt.h
* Header: https://github.com/theos/headers/blob/master/MobileGestalt/MobileGestalt.h


== External links ==
== External links ==

Revision as of 10:56, 22 May 2021


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+)

// bool MGGetBoolAnswer(CFStringRef key);
bool value = MGGetBoolAnswer(CFSTR("UIProceduralWallpaperCapability"));
NSLog(@"Value: %d", value);

References

External links