2
votes

I have some misunderstanding with apple in app purchase receipt status codes, after validation.

First created test user, and test application with in app purchases (about 3 items with types consumable, non-consumable, auto renewing). Bought 1 item with type auto-renewable subscription. After that i get receipt and it looks fine, and tried to validate it. Status code equals 0 and i have about 6 items in in_app array (looks fine too).

As i read from document https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW1 i should get 21006 which means This receipt is valid but the subscription has expired. When this status code is returned to your server, the receipt data is also decoded and returned as part of the response. Also there written Only returned for iOS 6 style transaction receipts for auto-renewable subscriptions.

So the question is what is iOS 6 style transaction? What status codes i should get from another iOS style transactions?

1
iOS 6 should be completely ignored since its market share is at most max. 2%Sithys
@Sithys tell it to my boss...tailec
... wasted time. Same thing everywhere...Sithys

1 Answers

0
votes

The reason lies on the link given by you only. If you see appStoreReceiptURL documentation, you may see that it became public only in iOS 7. This means that there is difference in receipt format and way to access it between 6 & 7.

You should be able to notice the difference only by running your code in 6 & 7, and getting the receipts separately.

The general advice would be to check the device version (don't use respondstoselector as appStoreReceiptURL existed earlier too) and interprete the status codes as the link advises.