ObjectiveC – Get device color

A simple trick, using private API to get the device COVER color!

You cannot use this in App Store, but you can play with private API:

NSBundle *b = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/FTServices.framework"];

BOOL success = [b load];

Class FTDeviceSupport = NSClassFromString(@"FTDeviceSupport");
id si = [FTDeviceSupport valueForKey:@"sharedInstance"];
NSLog(@"-- %@", [si valueForKey:@"deviceColor"]);}

And output:

TestJW[19775:2776384] -- #3b3b3c

That responds to this one: http://www.color-hex.com/color/3b3b3c

And… yes, my iPhone is dark gray! 

Alberto Pasca
Latest posts by Alberto Pasca (see all)