New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receipt parsing fails due to format changes #13
Comments
Do you have an example receipt? Then We could easily fix that. I'll look into supporting the conversion function with fractional seconds as well. |
Sure. Can I send you the receipt by email? I don't want to accidentally leak sensitive data. |
Of course, oliver@cocoanetics.com |
@Theome I enhanced the date parsing function to work with and without fractional seconds. |
Fix released in 1.0.4 |
Since a few days ago, some of the App Receipts that are generated by iOS have a slightly different format and Kvitto fails to parse these receipts properly. In my app, around 50% of the app receipts are affected. I'm already using Kvitto in my app since about a year, but this problem occurred for the first time on September 24.
It seems that the issue is that sometimes the date format contains fractional seconds, so for example a date looks like this
instead of this:
The method
_dateFromRFC3339String()
fails to parse the former date string, so_dateFromData()
throws andReceipt.init?(contentsOfURL)
returnsnil
.It's possible that there are some more changes to the format - I'm still investigating. If I find time in the next days, I'll prepare a pull request with a fix.
The text was updated successfully, but these errors were encountered: