Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: How to show GPS strength value?

I am trying to get the GPS strength value to show if the signal is strong or weak. Does anyone know how to get the value.

Thanks in advance.

like image 286
Luai Kalkatawi Avatar asked May 14 '12 12:05

Luai Kalkatawi


1 Answers

use the properties of CLLocation like horizontalAccuracy and verticalAccuracy which indicate how accurate the device believes that location fix to be.

and u can use

 if (someLocation.horizontalAccuracy < 0)
{
    // No Signal
}
else if (someLocation.horizontalAccuracy > 163)
{
    // Poor Signal
}
else if (someLocation.horizontalAccuracy > 48)
{
    // Average Signal
}
else
{
    // Full Signal
}

taken from link hope it helps. happy coding :)

like image 102
Anshuk Garg Avatar answered Sep 25 '22 21:09

Anshuk Garg