Our DNA is written in Swift
Jump

Kvitto 1.0.4

Kvitto is an open source component that lets you parse Apple sales receipt files, for example to determine if the user has an active auto-renewing subscription on device.

This new release fixes an urgent issue that appeared the first time on September 24th, in iOS 14, where about half the sales receipts could not be parsed. I also added support for Swift Package Manager 2 weeks ago and had forgotten to announce the release, so there you go.

Ad

Changes

  • NEW: Support Swift Package Manager
  • FIXED: dates with fractional seconds would not be parsed
  • FIXED: Relax check for sequence in root of PKCS7 container, as Apple might sometimes supply only 3 elements instead of 5

After seeing and collaborating with a few motivated developers on adding SPM support to DTFoundation and DTCoreText I felt empowered to tackle this for Kvitto myself.

About the fixed bug… I got first word about new issues with Kvitto from Canada on September 25th:

We’ve been getting some emails in the past couple days from users saying their subscription isn’t validating.

At first I shrugged this off, because I hadn’t changed anything, and why would Apple change something here? But then in the evening of September 27th, I got a detailed issue report from Germany, pinpointing the issue as being related to Apple now sometimes including fractional seconds on date fields. So instead of 2020-09-27T12:07:19Z we would now – sometimes, not always – get 2020-09-27T12:07:19.686Z – which NSDateFormatter is not smart enough to ignore.

My fix is basically to check the length of the string and then use the correct date format for that.

The release has been tagged on GitHub, thus is available via Swift Package Manager on the master branch, and it has also been released via CocoaPods trunk.


Also published on Medium.


Tagged as:

Categories: Updates

1 Comment »

Trackbacks

  1. Kvitto 1.0.5 | Cocoanetics

Leave a Comment

%d bloggers like this: