0
votes

I know how can I fetch current location but I want does ios support different api for mobile network and wifi network for getting of current location or same api will use for both?

Does ios current location api will take care of both network connection?

Reference from

https://developer.apple.com/library/ios/DOCUMENTATION/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/occ/cl/CLLocationManager

1
Chris pretty much sums it up. The one important point to also consider is that WiFi only cannot give you an altitude whereas GPS can. - sangony

1 Answers

1
votes

No, there is a single API for this case. What hardware the device uses is abstracted away for you. The desiredAccuracy property may however influence what hardware is used. If you request a kCLLocationAccuracyBestForNavigation accuracy it will most likely use the GPS hardware which is more expensive on battery. However if you request a kCLLocationAccuracyKilometer accuracy it will likely use cell tower information and triangulation strategies, but may consult the GPS hardware occasionally. You really should not need to worry about this when using the Core Location framework.