It can be very difficult to manipulate the action of apps and services that are triggered by GPS location on iOS devices. Oftentimes, the solution involves jailbreaking the device, something most people are not comfortable doing.
Xcode is one of the few solutions that can actually allow you to spoof location on iOS device manually using longitude and latitude coordinates or automatically using GPX files. Here, we examine how this tool works.
Here's a step-by-step guide to use Xcode to simulate location on your iOS device;
Step 1: Assuming that you already have an Xcode account, go to Account and click on "Download Tools." Wait while Xcode is installed. The process may include a few redirects to the App Store.
Step 2: Run Xcode and then connect the iOS device to the computer where you have installed Xcode.
Step 3: Click on File > New > Project to create a new Xcode project.
Step 4: Choose "Single View app" and then enter the Product name. Click "Next."
You should then see the screen as following.
Step 5: Select the location for the new project.
Step 6: In the next window, go to Xcode > Preferences > Accounts > Apple ID and log in to your account
Step 7: Select team and then press the ">" icon to start the building process.
Step 8: Once the build is complete, you will be redirected to a blank page where you can access the Maps application.
You can also change the location manually by entering longitude and latitude:
Step 1. Open the app in the Simulator menu and then go to "Debug > Location > Custom Location.
Step 2. Enter the coordinates for the new location.
If you don't k now the coordinates for the new location, you can find them using Open Street Maps or Google Maps. Just click on the location on the map and you should be able to see the coordinates.
Note: The simulator also offers "City Run", "City Bicycle Ride" and "Freeway Drive" to help simulate movement at different speeds.
If you have a lot of location changes to make, using custom locations option may prove difficult and time consuming. Xcode has solved this problem by allowing the use of GPX files.
GPX files are in XML format and can make location spoofing very easy, particularly if you don't know the coordinates for the new location you want to use.
There are a lot of places online that you can find GPX files. One the file is added into Xcode, it corresponds with various pins on the map to indicate the location.
Xcode will then use the GPX file to simulate movement of the device sequentially from one pin to another. When the path is complete, it will go back to the first point.
The time it takes to move from one point to another will be determined by the "time" element in the GPX file that you are using. To spoof location using GPX file:
1.Go to the Active Scheme section and click on it.
2. Click on Edit Scheme.
3. Select the Allow Location Simulation checkbox in the Run Scheme > Options tab.
4. Open Xcode's main menu and select Debug / Simulate Location / Add GPX File to Workspace to import GPX into the program.
5. Choose the GPX file you downloaded. If you open Debug / Simulate Location / Add GPX File to Workspace again, the GPX file will be shown.
6. In the Debug area of Xcode, you can also select the location by selecting the location arrow symbol.
Although Xcode can be very useful, it may not be an ideal solution if you are new to this process or if you just want a less complicated solution.
To change the location on your iOS device or simulate GPS movement very quickly, we recommend choosing MockGo.
This is a very simple to use GPS simulator that allows you to change the location of the iOS device to anywhere in the world or simulate GPS movement along a specified path at a customized speed.
What's more, the latest macOS version of MockGo works well with the new iPhone 15 and iOS 17. Windows version is on the way to support iOS 17. Please stay tuned!
Here's how to use MockGo:
Step 1: Download and install the MockGo Toolkit on to your computer. Open it.
Step 2: Connect the iPhone to the computer and click "Start" from the interface of MockGo.
Step 3: You should be able to see the device's actual location on the next screen. If the location you see is not the correct current location, click on "Center On" at the bottom-right side of the screen to fix it.
Step 4: Select the "Teleport Mode" in the top-right corner of the screen and then enter the name of the location you want to use. Click "Go".
Step 5: The program will detect the selected location. In the popup that appears, click on "Move Here".
And the GPS location of the device will change to the new location immediately!
To simulate GPS movement between two spots, follow these simple steps;
Step 1: Once the device is connected and you see the map on the screen, click on the "one-stop mode" icon (the 2nd icon in the top-right corner).
Step 2: Choose the two spots on the map and a box will appear showing the distance to be covered.
Step 3: Select the speed and then click "Move Here".
Step 4: In the popup that appears, select the number of times that you would like to move between the two selected spots and then click "Start" to start the simulated movement.
Faking the GPS on your iOS device doesn't have to be difficult. Tools like MockGo can make the whole complicated process as simple as just connecting the device to the computer and selecting the new location.
Once done correctly, you can manipulate the GPS to gain access to content that may not be available in your location or to play location-based games. The applications are limitless.
Mako is a technical writer with a passion for all things tech. Whether you're wondering about how to fix your iPhone or Android device or trying to get something to work in your settings, Mako is your go-to for professional help. He loves writing, testing solutions, and most of all, making sure his research is factually accurate.