Skip to main content
Location Spoofing on iOS & Mac
Doris Sooläte avatar
Written by Doris Sooläte
Updated over 5 months ago

Do not use location spoofing unless explicitly told to do so as part of your workspace instructions. Otherwise, location spoofing represents a breach of the Freelancer Services Agreement.

Note: This guide is written for Xcode 15.1, but the steps should be similar for other Xcode versions.

Download the spoofing project and route simulation file

  1. Download the LocationMovement file.

  2. If predefined Xcode Locations are not enough for the test, download the GPX file for route simulation.

Install Xcode on your Mac

If you don’t have Xcode installed:

  1. Sign in with your Apple ID.

    • Register your Apple developer ID.

    • Note: There is no need to enroll (you would have to pay). Just register your account and accept the “Registered Apple Developer Agreement”.

  2. Download and install the latest Xcode.

    • Note: You don't need a developer license to run the project.

  3. Log in to Xcode.

    • Xcode > Settings > Accounts > Add a new account > Log in with your Apple ID

Set up the spoofing project in Xcode

  1. Uncompress the LocationMovement zip file.

  2. Open the project in Xcode: File > Open > LocationMovement.xcodeproj

  3. Add the route simulation file update_fake_route_here.gpx to the project (drag and drop) and delete the “red color - update_fake_route_here”.

    The project hierarchy within Xcode

  4. Configure the LocationSpoofing project.

    • In XCode, Click LocationMovement > General.

    • In the Identity section, make sure the Bundle Identifier is a unique string, as it’s necessary to sign certificates. Add a suffix to the name (the following example uses LocationMovement, but it can be anything).

    • Set the Minimum Deployments to match the iOS version of your device.

    • In the Signing section, make sure your name is selected as the Team.

  5. Connect your iOS device to your Mac and select it as the build destination.

    To set the destination, in Xcode select Product > Destination > Device name.
  6. To start the build, click Play.

    1. When the build is complete, you see Build succeeded (you might be asked to allow access for codesign > Always allow).

    2. If you device is not set to trust developer profiles, you see an error.

      1. Fix it on your iOS device (Settings > General > Device Management > Developer App > Trust your developer profile > Trust).

      2. Click Play again.

    3. When the build succeeds, the LocationMovement app opens on your iOS device.

      • Navigate to the map app of your choice > Your location in the map should change to Cambridge, Massachusetts, USA.

Run the simulation with a different GPX file

Method 1

  1. In Xcode, drag and drop your new GPX file.

  2. Run the route simulation: Click Debug > Simulate Location > File name.

The file position in Xcode.

Method 2

  1. At the top of Xcode, click LocationMovement > Edit Scheme...

    Where Edit Scheme sits in Xcode.
  2. In the dialog: Click Run > Click Options > Make sure Allow Location Simulation is selected and for Default Location select “update_fake_route_here”.

  3. Next Step: If you have a new GPX file:

    1. Click “update_fake_route_here”.

    2. Paste the new XML file from your downloaded GPX file.

    3. Click Play (to create new build on your device).

  4. The location is simulated without needing to Click Debug.

The Play button in Xcode.

Understanding the GPX file

Dynamic Position

Dynamic position means that your position is not static in one location. So your GPX file has a lot of <wpt></wpt> elements, which include time. The difference in time between each of these elements gets your speed.

Static Position

With a static position, you have only 1 <wpt></wpt> element because you are staying at the same position.

#TestlioBot

Did this answer your question?