Auto-renewable subscription in ios7

To check if a user still has access to the product you should store the receipt data you received during the payment and check that receipt with the app store service.

The app store service will reply with a status for your receipt (0 for valid receipt, 21006 if the subscription has expired and was not renewed, etc)

The process with sample code can be found here :

https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW3

To answer your last question : Yes Apple rejects a lot of ARS apps, it only works for content apps (magazine, newspaper, videos, etc). For example if you offer a service such as dropbox your app is not eligible to ARS

In our case we are distributing a book subscription service, to validate the app Apple asked us how many new content is available to users every month.


edit

For iOS 7 status 0 represents a valid receipt even if it’s expired :

For iOS 7 style app receipts, the status code is reflects the status
of the app receipt as a whole. For example, if you send a valid app
receipt that contains an expired subscription, the response is 0
because the receipt as a whole is valid.

You need to verify the latest_receipt_info expires_date.

Leave a Comment