I'm using nst's iOS Runtime Headers to get access to the CoreTelephony.framework.
Here is his sample code:
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"]);
His sample usage code gives me access to FTServices.framework but when I apply the same logic, it fails since CoreTelephony does not house a class method named sharedInstance().
Should I declare and implement that myself or is there another way?
Thanks.
EDIT:
My attempt:
NSBundle *b = [NSBundle bundleWithPath:@"/System/Library/Frameworks/CoreTelephony.framework"];
BOOL success = [b load];
Class CTTelephonyNetworkInfo = NSClassFromString(@"CTTelephonyNetworkInfo");
id si = [CTTelephonyNetworkInfo valueForKey:@"sharedInstance"]; // fails here
NSLog(@"-- %@", [si valueForKey:@"cachedSignalStrength"]);