LocationInjector
This project purpose is to simulate a running/driving GPS session
Getting Started
These instructions will get you a copy of the project up and running on your local machine.
- Open GPSies Track Builder
- Add coordinate points on the map
- Find the "Export file" section, select GPX Track and download the file
- This .gpx file must be converted to the Apple .gpx format or it will not be read. You must convert it first:
- Copy the file "adjust_gpx_to_apple_format.awk" from "GPXtoAppleGPXconverterScript" in the same directory you downloaded the .gpx file
- Open Terminal and navigate to the abovementioned directory
- Enter the following command and replace "source-file" with the filename of the downloaded file and "output-file" with the resulting file name:
awk -f adjust_gpx_to_apple_format.awk "source-file" > "output-file"
Example:
awk -f adjust_gpx_to_apple_format.awk Office-Motortrack-Office-10kmh-original.gpx > Office-Motortrack-Office-10kmh-converted.gpx
- Open "LocationInjector.xcodeproj" file from "LocationInjector" directory
- Import your converted file in the GPX Files folder (preferably)
- Run the app on the same device/simulator you want to simulate GPS movement
- Select the location arrow button in the debugger bar (it's right next to the App name on the left side)
- Select the file you just imported
- Press the Home button on your device/simulator and then open the app you want to test
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
- How To Simulate GPS Movement in iOS - The tutorial I followed
- Amit Palomo GPX Conversion script - Original .gpx conversion script