iOS: How to find the latest auto-renew/purchase info from the in-app purchase receipt

467 views Asked by At

I implemented the auto-renew subscription in my iOS app. Once the purchase was done then am passing the receipt data to my own server and on my server am passing that encoded receipt data to iTunes server and get the valid json response with bunch of purchase info. The problem was, the received receipt has all the transactions that was made by user. So, i do not know how to get the latest purchased receipt info from that json response. I need to parse the entire json and then only i can get to know the latest receipt?. Is Apple wont give the latest receipt in top or in bottom?.

Any helps that might be really appreciated.

1

There are 1 answers

0
loganathan On

Finally i found the answer. Actually, you need to parse the entire receipt which was received from apple's itunes server and from that you can know the latest purchased receipt by comparing the previous purchased receipt expire time and the next purchased receipt expire time. You need to do this until you reach end of receipt.