Open justbcuz opened 5 years ago
Yikes!!! Thanks for catching this. There are a few things that I'd like to see changed here (safe grabbing of collections 🤔). We'll get a fix for this soon :)
@vermont42 Yes, there maybe some sort of Astérisk shenanigans going on there :)
Please find below a ZIP if the gpx file I am testing with. Luv-hq-30mph.gpx.zip
I am writing a persistent data POC to test realtime data synchronization and was using location updates as the trigger to update a stored object. To see the data synchronization across devices (and not leave my desk) I wanted to test locally using multiple simulators, but Simulator only attaches the Debug->Location->Freeway Drive to the active Xcode debug session. Therefor I could see the data sync going oneway.
This is when I found GpxLocationManager. I love the passthrough wrapper around CLLocationManager, it makes local Location simulation testing an easy add.
#if targetEnvironment(simulator)
let _locationManager: LocationManager = LocationManager(type: .gpxFile("Luv-hq-30mph"))
#else
let _locationManager: LocationManager = LocationManager(type: .coreLocation)
#endif
I plan on using this more and more.
There is a fatal crash with index out of range at line 167 in GpxLocationManager.swift.
Look like the ">=" of the if statement on line 166 is incorrect.