I'm currently developing a Flutter app using VSCode and the Xcode iOS-Simulator.
While developing, I would like to simulate a "City Run" using custom locations instead of the pre-loaded iOS City Run-locations.
I was able to add a custom city Run to a Xcode-Project (using a .gpx-file), but could only use it while Debugging the Xcode-Project.
Now, I couldn't figure out a way to change or update the City-Run locations in a project not running in Xcode, but VSCode.
Do any of you have an idea on how to either:
I'm currently running:
Thank you very much guys! Any help will be highly appreciated!🙏
Cheers, Tobi
For now I found workaround which might not be beautiful, but it does the job for me.
I followed along this article and wrote a little AppleScript to regularly update the current location and simulate a "City Run".
Although it has a couple of downsides (e.g. Simulator must be the frontmost process) it does the job for simulating the City Run during development for me.
Still, if anyone comes up with a better solution, please let me know.
This is what the script does look like for now:
on run
tell application "System Events"
tell process "Simulator"
set frontmost to true
click menu item "Custom Location…" of menu of menu item "Location" of menu "Features" of menu bar 1
set popup to window "Custom Location"
set value of text field 1 of popup to "<lat here>"
set value of text field 2 of popup to "<long here>"
click button "OK" of popup
delay 2
-- (Further locations here)
end tell
end tell
end run
Cheers,
Tobi