Faking location in Android and iOS to discover Virtual/GPS locations

From MozillaWiki
Jump to: navigation, search

For Android devices

You can use one of the applications in Google Play that change your GPS location entering the coordinates (latitude, longitude). We have been using this one but there are many of them in the store.

  • Using this app, press on the green arrow in the map view, after entering the GPS coordinates you want to fake, to ensure you are sending the new coordinates correctly

For iOS devices

We have not been able to find any app to fake the location so we are doing it using the Xcode to simulate it. Steps to follow:

  • Pre-requisites:
    • Project Magnet for iOS installed (More info to build a Magnet iOS build)
    • Phone has to be connected to the laptop and the Xcode simulator must be used to debug the Magnet app (e.g Execute in the Xcode menu "Product"/"Perform Action"/"Run without building"
  • Steps:
    • Create a GPX file and enter the location/coordinates you want to fake. Example of the content of the file:
<gpx>
   <wpt lat="51.498594" lon="-0.133106"></wpt>
</gpx>
    • Execute in the Xcode menu "Debug"/"Simulate Location"/"Add GPX File to Project" and pick up the GPX file you have created
    • Execute in the Xcode menu "Debug"/"Simulate Location" and check your GPX file
    • After that, refresh project Magnet application (scrolling down the main screen of the app) so you can see the Virtual Beacons around to the new location you are faking