Add own custom location using GPX file
suggest changeChecking location services needs a real device, but for testing you can also use the Simulator and add your own location:
- add new GPX file into your project.
- in GPX file add waypoints like
<?xml version="1.0"?>
<gpx version="1.1" creator="Xcode">
<!--
Provide one or more waypoints containing a latitude/longitude pair. If you provide one
waypoint, Xcode will simulate that specific location. If you provide multiple waypoints,
Xcode will simulate a route visiting each waypoint.
-->
<wpt lat="52.599878" lon="4.702029">
<name>Example location</name>
</wpt>
</gpx>
- then go to product–>Scheme–>Edit Scheme and into RUN set default location as your GPX file name.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents