DEV Community

Erol Işıldak
Erol Işıldak

Posted on

Streamlining Location-Based Testing: How I Built Custom GPS Mocking Tools for Android & iOS

Simulating indoor layouts and beacon workflows is one thing, but when it comes to testing location-based features globally, real-world GPS testing can quickly become a bottleneck.

While working on location-based applications, I noticed a recurring pain point: market solutions for simulating GPS locations—especially for iOS—are either highly limited, expensive, or fail to meet exact technical testing needs.

To bridge this gap, I built two lightweight, production-grade local tools to make location-based testing and development smoother. Here is a breakdown of how they work.

🤖 1. Android GPS Changer (Native APK)
On Android, leveraging the system's native capabilities is usually the cleanest route. I developed a native APK that acts directly as a system mock location provider.

Setup & Workflow:

Enable Developer Options on the target Android device.

Install the GPSChanger APK.

Go to Developer Options, look for "Select mock location app", and select GPSChanger.

Once configured, the app can inject mock coordinates seamlessly into the Android Location Services, allowing any app under test to read the simulated position as if it were real.

🍏 2. iGPSChanger (macOS Desktop App for iOS)
iOS is notoriously strict about mock locations. Setting up mock locations directly on an unjailbroken iPhone without an external computer is close to impossible for daily automated/manual QA workflows.

To solve this, I built iGPSChanger, a native macOS desktop application that manipulates connected iOS devices via USB.

Setup & Workflow:

Download and extract the macOS application.

Since it's a locally built tool, bypass the macOS Gatekeeper security policy on the first launch (System Settings > Privacy & Security > Click "Open Anyway").

Connect the iPhone to the Mac via a USB cable.

Select the target coordinates on the desktop UI, and the app communicates with the device's developer disk image to override the system GPS.

✨ The Ultimate Quality-of-Life Feature: Save & Re-use
Whether you are testing Android or iOS, typing latitude and longitude coordinates repeatedly is a massive waste of time.

To maximize productivity, I implemented a Save & Re-use Locations feature in both apps. You can bookmark your frequently used test coordinates (e.g., specific test venues, office locations, or international coordinates) and instantly select them from your history/memory for quick access in future testing sessions.

Conclusion & Feedback
Building custom internal tools tailored exactly to your testing workflow saves countless hours of manual debugging. If you are struggling with market solutions for GPS manipulation, building a dedicated desktop-to-device bridge or a native mock provider is highly rewarding.

Have you built similar internal tools for your QA or development workflows? What is your biggest pain point when testing location-based services? Let's discuss in the comments! 👇

Top comments (0)