3

In my iOS app, I included in-app purchase for subscription. In order to use the app, they have to purchase the subscription and then only it will work.

I don't have any server and so I'll maintain all the data with in the app, like receipts, product details etc.

First time after purchasing the subscription, immediately, I'll send request for validation receipt. In that receipt, I'm extracting the "expires_date" value (which is in milliseconds since 1970) and converting it to date and storing it in NSUSerDefaults.

I'm getting the expired date as same date when I'm checking it. Don't know whether sandbox will send short duration date for testing purposes or will sandbox server sends expires-date only for renewed subscriptions.

How to identify the expiration date?

BartoszKP
  • 34,786
  • 15
  • 102
  • 130
Satyam
  • 15,493
  • 31
  • 131
  • 244

1 Answers1

9

The sandbox is supposed to return expiration dates in the following scheme.

enter image description here

This is from page 164 of the iTunes Connect Developer Guide

If it is not working this way you may want to file a bug report.

Chris Wagner
  • 20,773
  • 8
  • 74
  • 95
  • Oh nice... I missed that part about it only renewing 6 times. That explains a lot. Thanks! +1ing this. – ZettaGeek Jan 03 '13 at 17:15
  • 1
    Sandbox durations can nowadays be found at https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/TestingInAppPurchases.html – dakab Jan 07 '15 at 07:02