Testing Geo Location in iOS and Android apps using Google Maps

Update 3 Nov: I've created a dedicated interface for this purpose see my updated post.

When building location aware applications testing a single GPS location is trivial. However testing an entire route is a bit more tricky.

Both iOS and Android development environments offer a GPS location simulation based on GPX file data. The biggest problem is how do you actually collect the GPS data to produce this file?

Using Google Maps

In August 2015 I wrote about a simple web tool I built to convert Google Maps Directions to GPX.

Try the web-app now

A recent article written by the people at the Uppercut technology agency showed how to leverage my tool to be able to plot out the GPS paths in Google Maps and generate the necessary replay GPX file. However due to limitations in Xcode some non-trivial manual modifications were needed (their article goes into details).

Supporting both Android and iOS development

The Uppercut article gave me the idea and I updated my converter tool to be able to produce GPX files directly from Google Maps Directions that are fully compatible with both iOS and Android development environments.

I added a new section called "Developer Settings" available in the tool that enables some specific configuration options to enable this kind of GPX replaying. Note these settings have no effect if JSON output is selected.

Below I describe the necessary configuration for each platform. Both methods assume that you already have a valid Google Maps Directions link as described on the conversion tool's website.

iOS How to

Configuration for Xcode

Configuration for Xcode

  1. Ensure that GPX output is selected.

  2. Expand the Developer Settings section near the bottom of the page.

  3. Tick both the Force route as waypoints and Simulate Travel Duration options.

  4. Pick a simulated travel duration from the drop down boxes (hours and minutes).

  5. Click the Let's go button.

Follow the Uppercut tutorial or any number of others on the Internet on how to load the resulting GPX file into Xcode.

Android How to

Configuring for Eclipse or Android Studio

Configuring for Eclipse or Android Studio

  1. Ensure that GPX output is selected.

  2. Tick the Track Points option.

  3. Expand the Developer Settings section near the bottom of the page.

  4. Tick the Simulate Travel Duration option only.

  5. Pick a simulated travel duration from the drop down boxes (hours and minutes).

  6. Click the Let's go button.

Try the web-app now

This article is also available on LinkedIn at: https://www.linkedin.com/pulse/testing-geo-location-ios-android-apps-using-google-sigmundarson



Software Developer
For hire


Developer & Programmer with +15 years professional experience building software.


Seeking WFH, remoting or freelance opportunities.