Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing transactions in Sandbox StoreKit receipt

The app I'm currently working on has a mix of non consumable products and auto renewable subscriptions. Looks like after one or two days, purchased non consumable products are removed from the Sandbox receipt. Upon restore the products are provided by StoreKit observer callbacks, but they are still missing from the receipt.

I've tried both local validation and parsing via OpenSSL and the remote validation via Apple servers and the results match: those products are always missing. Note that this never happens with subscriptions, both expired and valid ones are always present in the receipt. Another funny detail: products don't go missing all at once, they progressively disappear following the purchase order, as the sandbox test user was being "cleaned up".

Since Apple docs state here that "Non-consumables, auto-renewing subscription items, and non-renewing subscription items remain in the receipt indefinitely" I would expect them to be there.

Does anybody know if this is an expected sandbox behaviour? Is there any official Apple resource stating that it's going to be ok once the app is in production?

EDIT: Found the exact same issue posted by somebody in the dev forums here.

like image 388
Massimo Cesaraccio Avatar asked Nov 06 '22 13:11

Massimo Cesaraccio


1 Answers

Non-consumable transactions are not returned in the JSON response from iTunes server validation.

However, they are present in the receipt and you can see them parsing it locally.

like image 150
Matteo Gobbi Avatar answered Nov 15 '22 04:11

Matteo Gobbi