vincentneo / CoreGPX

A library for parsing and creation of GPX location files. Purely Swift.
https://www.vincent-neo.com
MIT License
261 stars 57 forks source link

fallibleParsedData doesn't support GPX 1.0 parsing #96

Open OlKir opened 2 years ago

OlKir commented 2 years ago

Thank you for maintaining a great and useful library! I was happy to see that it now also supports GPX 1.0 files but my first attempts to parse one failed.

Looking into the code I found that flow to parse legacy GPX was added to parsedData() but fallibleParsedData(forceContinue: Bool) still contains hard check for 1.1 version.

I prefer to use fallibleParsedData as it throws error messages and could handle slightly disordered data. And I would be grateful if you add support for 1.0 parsing there as well.

vincentneo commented 2 years ago

Hi @OlKir,

Been a while since I touched the code on this v1 support, I think currently only .legacyParsingData() parses that for now. (if I recall correctly)

And yes, this brings up a good point where there isn't feature consistency when parsing between these gpx versions, which is something that I should work on.

Thanks for sending this issue in!

john-work-ios commented 4 months ago

Just ran into this as well! :-) I'll be moving to parsedData() for now.