5

I ordered a auto-renew product, After 5 minutes ,it become expired!

I think in Sandbox 5 minutes is equal to 1 month,

At the end of current subscription peroid(after 5 minutes), it should't be auto-renewed? but it become expired.

Db Xiong
  • 107
  • 1
  • 9

3 Answers3

16

In the sandbox environment, auto renewable subscriptions are much shorter than the actual time. From this answer:

   Actual duration      Sandbox duration
   1 week               3 minutes 
   1 month              5 minutes
   2 months             10 minutes 
   3 months             15 minutes 
   6 months             30 minutes 
   1 year               1 hour

And although this fact is not documented, according to some developers in Apple's developer forum (and my own experience), subscription will renew 5 times before you get 21006 error (subscription expired error). So if you have a 1 month subscription, it will be renewed every 5 minutes for 25 minutes. Don't rely on this fact though, as it's not officially documented and might change anytime.

Community
  • 1
  • 1
Enrico Susatyo
  • 19,372
  • 18
  • 95
  • 156
  • 1
    Im just starting out testing receipt verifications, but I cant seem to force a `21006`. I seem to always get the status 0. I use https://github.com/pcrawfor/iap_verifier to verify the receipt on NodeJS. Suppose I should always use the `verifyAutoRenewReceipt` method? Not sure what `verifyReceipt` does, but I've never been able to get it to work. – Cmag Oct 02 '14 at 15:17
  • 1
    Updated Apple doc here: [Testing Auto-Renewable Subscriptions](https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/TestingInAppPurchases.html#//apple_ref/doc/uid/TP40013727-CH4-SW5) – n8tr Jan 14 '15 at 16:40
6

This is my experience as well. Auto-renewing in the sandbox environment is inconsistent. On some occasions I've seen a sandbox subscription auto-renew about 5 times before ending. But on other occasions it doesn't auto-renew at all. I assume these problems don't exist in the production environment.

Andrew
  • 8,363
  • 8
  • 43
  • 71
2

I have experienced this as well, but if I kill the app from the multitasking tray (or stop the process in Xcode) and relaunch, I get an updated transaction with state "SKPaymentTransactionStatePurchased" that essentially renews the subscription. Check that out. It will at least give you something. Very frustrating that this is so inconsistent and not in alignment with the documentation.

jbcaveman
  • 911
  • 1
  • 10
  • 19
  • Yes, same behaviour here too. Sub didn't renew (no new receipt), Store settings said it had expired but the auto-renewal was clearly still active and the 5 min (1 month) subscription was only about 10 mins old. Killed the app and restarted and now I'm subscribed again. Yes it's very annoying. – Rich Feb 09 '12 at 11:24