Hi,
do you know how to add custom debug locations (like the Debug -> Location -> Freeway Drive) to a simulator? Or achieve similar results by other means?
It seems to be no longer possible since the 9th version of Xcode as you can read in the following tool's/article's comments: https://bottleofcode.com/2014/10/18/adding-your-own-gps-data-to-the-ios-simulator/
It's also not possible to use Instruments UIAutomation because it's no longer a part of the Instruments, so using this is not possible: http://sergiinezdolii.blogspot.com/2015/02/ios-simulate-frequent-gps-location.html
I do know about following alternatives:
1. use GPX file and the "simulate location" in Xcode, like described here:
2. implement something similar to (or just use if it meets requirements): GpxLocationManager: https://academy.realm.io/posts/josh-adams-gpx-location-manager/
3. use AppleScript in order to update GPX file dynamically as described here: https://enrise.com/2017/07/testing-gps-location-based-mobile-apps/
Unfortunately, it's not possible to do what I need (or it is very time consuming/requires changing code base just to make some simulation which does not seem to be right):
* receive location updates with variable speed and altitude data
* I need location updates to arrive with a variable time interval (like every second, then every 5 seconds, then pause for a minute etc - don't want to make the pause manually).
* deliver location updates when the app is in the background
The alternatives I listed above are not enough, because:
1. "simulate location" in Xcode does not provide speed/altitude information
2. GpxLocationManager requires changing my code and it does not deliver location updates the same way as iOS and can't be as easily controlled as Debug -> Location -> Freeway drive - I can enable / disable / change it at any moment.
3. AppleScript & dynamic GPX updates solve the problem of delivering location updates all the time, but not missing speed/altitude info
So currently I'm using GPX & Xcode's simulate location and I pass the location updates through my function which updates speed/altitude information, but it's not as convenient as the custom Debug -> Location.
Do you have a plan to enable developers to add custom debug locations and test location updates with speed, altitude and controlled time interval between location updates @apple?
It would be very helpful and help us test more realistic scenarios!
Thanks!