0

After doing the research for several hours, I could not find a correct solution to solve my problem. I decide to ask the question myself.

I want to simulate customized location updates in iOS simulator and customize the speed of movement when simulating.

My current way of doing this is to create a customized GPX file and add the GPX file in Xcode->Debug->Simulate Location. The GPX contains several waypoints with coordinates. After simulating the location, the app successfully updates the user location. However, the speed stays constant and it's -1. I tried to add some time tag in the GPX file but it won't change the speed.

Here is part of my GPX file:

<gpx>
    <wpt lon="-117.224240" lat="32.871250">
        <time>2015-06-27T03:08:41.405Z</time>
    </wpt>
    <wpt lon="-117.223830" lat="32.871058">
        <time>2015-06-27T03:08:42.457Z</time>
    </wpt>
    <wpt lon="-117.223630" lat="32.870965">
        <time>2015-06-27T03:08:42.970Z</time>
    </wpt> 
</gpx>

Any suggestions to customize the speed of movement?

1 Answers1

0

Did u do this? In debugger window:

enter image description here

Yaro
  • 1,222
  • 11
  • 15
  • I cannot see my file in simulator -> Debug -> Location. I can only see None / Custom Location / Apple / City Bicycle Ride / City Run / Freeway Drive. Custom Location only allows me to set one location. – huanyunyilun Jun 27 '15 at 18:06
  • Looks like you have not added the GPX file correctly. Here is how: http://stackoverflow.com/questions/29544344/add-gpx-file-to-xcode-6-project Goog luck! – Yaro Jun 28 '15 at 00:00
  • 1
    Thanks for your reply. I believe I have added GPX file correctly as I follow the tutorial. I still don't find my customized GPX file in simulator top menu -> debug -> Location. And I didn't find anything to change the speed. – huanyunyilun Jun 28 '15 at 03:39
  • If you can't see the 'None', 'City Bicycle Ride' etc, then just click on the simulator then click `Debug` –  Jul 16 '19 at 12:10