Make Better Things



I like to make better things.

How to show GPS strength value in iOS SDK

To show the signal strength of GPS we can use the properties of CLLocation like horizontalAccuracy and verticalAccuracy which indicate how accurate the device believes that location fix to be.

Here is some sample code -


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

Category: iPhone, Objective-C

Tagged: , , , , ,

Leave a Reply