You can use Instruments to simulate location updates:
Via Automation It allows to write script using javascript, which will set Location and delay next location update.
Actually, simple setting location will look like:
var target = UIATarget.localTarget();
var location = {
latitude: 59.335435,
longitude: 18.017269
};
var locationOptions = {
speed: 2.78,
altitude: 200,
horizontalAccuracy: 10,
verticalAccuracy: 15
};
target.setLocationWithOptions(location, locationOptions);
To be able to run this script, you need to “Profile” your application from Xcode. For this go to Menu Product → Profile and your application will start alongside with Instruments. In Instruments select “Automation” and then create new script with body as above.
Your application should be automatically selected as Target in top left of Automation tool.
Just paste script to the Script area and press Run button.
If app was not started, it will be started.
Then script will run and you should see that location was set within your app.
You can just create array of several locations and locations options and then go in the loop through them. To make some delay, you can just use delay command.
var target = UIATarget.localTarget();
var locationOptions = {speed:2.78, altitude: 200, horizontalAccuracy:10, verticalAccuracy:15};
var locations = [
{latitude: 59.335435, longitude: 18.017269},
{latitude: 59.33618, longitude: 18.018288},
{latitude: 59.337192, longitude: 18.01643},
...
{latitude: 59.335769, longitude: 18.025336}
];
for (var i = 0; i < locations.length; i++) {
target.setLocationWithOptions(locations[i], locationOptions);
target.delay(10);
}
Ref: http://sergiinezdolii.blogspot.com/2015/02/ios-simulate-frequent-gps-location.html