I am getting my current location in my application by
- (void) locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
is it works if wifi is not available ? is there any other way for getting my current location GPS?
Yes it will work when there is no WiFi available.
The
CLLoactionManagerwill try to triangulate the location by wifi first, then cell towers and will use GPS as the last option.This is why the
didUpdateToLocationget called multiple times, every time the location will get more precieze. When it get a real GPS fix the positron will be the most precieze.The is no way to see how the
CLLoactionManagerretrieved the location, however you can look at the accuracy to see how accurate the location is.