How to set fake GPS location on IOS real device How to set fake GPS location on IOS real device ios ios

How to set fake GPS location on IOS real device


When running in debug mode you can use the little arrow button in the debug area (Shift+Cmd+Y) in Xcode to specify a location. There are some presets or you can also add a GPX file.

Specify debug location

You can generate GPX files here manually: http://www.bikehike.co.uk/mapview.php(from answer: https://stackoverflow.com/a/17478860/881197)


Create a .GPX file with xcode, then specify your coordinates and when your device connected, hit the little arrow button and select your .GPX file.You can create multiple files and add lots of coordinates to single .GPX file in order to make some kind of route.


Of course ios7 prohibits creating fake locations on real device.
For testing purpose there are two approches:
1) while device is connected to xcode, use the simulator and let it play a gpx track.

2) for real world testing, not connected to simu, one possibility is that your app, has a special modus built in, where you set it to "playback" mode. In that mode the app has to create the locations itself, using a timer of 1s, and creating a new CLLocation object.

3) A third possibility is described here:https://blackpixel.com/writing/2013/05/simulating-locations-with-xcode.html