i curious why i get wrong value to get carrier name and signal strength. Here the code.
CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *car = [netinfo subscriberCellularProvider];
NSLog(@"Carrier Name: %@", car.carrierName);
[netinfo release];
Why i get value "carrier" instead of carrier i use?
this is code to get signal strength
void *libHandle = dlopen("/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony", RTLD_LAZY);
int (*CTGetSignalStrength)();
CTGetSignalStrength = dlsym(libHandle, "CTGetSignalStrength");
if( CTGetSignalStrength == NULL) NSLog(@"Could not find CTGetSignalStrength");
int result = CTGetSignalStrength();
NSLog(@"Signal strength: %d", result);
dlclose(libHandle);
as i kno, signal strength is in dBm value (in negative), but why the value above show positif value and now shown the signal strength? is there any value mapping to present the signal strength on dBm
P.S i ran the program on the real iphone devices and still get wrong value.
any help would be appreciate.
Thanks.