Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone simulator location is wrong

I'm exploring location services, and my iOS Simulator on Xcode 4.6 is showing the wrong latitude and longitude. I've done this in two ways, with CLLocation manager instance, and with using HTML5 Geolocation and Cordova. The same javascript works perfectly on a web browser, but not from the simulator. I get the same wrong coordinates using the CLLocation manager as well. Is this a problem with the simulator, and how can I fix it?

like image 516
Carpetfizz Avatar asked May 01 '26 01:05

Carpetfizz


1 Answers

This is not a bug, but a feature; the simulator is not supposed to be real, it's supposed to simulate, to let you customize the environment in order to test your program. It gives you the option in the debug menu to set the location for it to use, as Nirk said. This way you can make sure it functions correctly with some arbitrary locations.

like image 164
Alex Coleman Avatar answered May 02 '26 15:05

Alex Coleman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!