Skip to content
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

Check for actualSequence.count == 5 may fail as Apple doesn't always supply 5 elements. #14

Closed
staninprague opened this issue Sep 28, 2020 · 1 comment

Comments

@staninprague
Copy link

Thank you for the great library!

Wanted to give you a heads up on the following line of code:

let actualSequence = containedSequence[0] as? [AnyObject] , actualSequence.count == 5,

At some point this year Apple started to supply 3 items in this sequence. I changed it to actualSequence.count > 2 as there is no need to use anything from it above [2]. Since then it is working alright.

This was the issue both in production receipts and sandbox in August 2020. I'm not sure if this issue still persists. But the above change will relax the requirement on the sequence to the data you really need, not stricter.

Thank you again! Looks like Apple is fiddling around with the receipt lately, hope this input will help you and others.

odrobnik added a commit that referenced this issue Sep 28, 2020
…might sometimes supply only 3 elements instead of 5 #14
@odrobnik
Copy link
Collaborator

Thanks @staninprague, I made the suggested change in
c56e422, I re-tagged the release so that 1.0.4 also contains it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants