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
Support of StoreKitTest receipts #15
Comments
Yes, I would have to figure out how the indefinite length encoding works. I found this: http://luca.ntop.org/Teaching/Appunti/asn1.html As far as I can tell, the content then goes until two binary zero bytes. So please mail me such a file using this length encoding, then I'll add it to my ASN.1 parser in DTFoundation. oliver@cocoanetics.com |
@odrobnik I've sent you a sample receipt. Please let me know if I can help any further. |
I don't see that TPInAppReceipt would support the indefinite length form. It's using SwiftASN1, and that doesn't support a length code of 0x80: https://github.com/filom/ASN1Decoder/blob/master/ASN1Decoder/ASN1Decoder.swift#L159-L200 |
Well, I tried to parse the receipt that I sent you with TPInAppReceipt and it worked. After reviewing recent commits at its repository I found some references to StoreKit, for example in tikhop/TPInAppReceipt@827fa17. Hence, I assumed that the necessary functionality was implemented there. |
@RenGate unfortunately that is a longer exercise than I had hoped. I have to implement in each leaf parsing that it returns the actually needed length and then advance the parsing pointer by that value. |
@RenGate Please have a look at the latest version in develop (referencing DTFoundation develop as well). I've got it as far as parsing everything and getting some values from the receipt as well as some IAP records. Could you test that version at your end as well? |
@odrobnik Yes, that works perfectly, thank you. Also, can you please remove the |
In Xcode 12 Apple added a new way of testing In-App purchases (see Introducing StoreKit Testing in Xcode WWDC 2020 talk for more info). The new method relies on receipts signed with a different private key than ordinary receipts. During an attempt to parse such a receipt I get an "Indefinite Length form encounted, not implemented" error inside
DTASN1Parser
.Can you please add the support of StoreKitTest receipts in Kvitto? I can send you an example of such a receipt over an email if you need one. This functionality was implemented in TPInAppReceipt, so you can check it for reference.
The text was updated successfully, but these errors were encountered: