iphone - In app auto-renewable subscriptions -


Sorry for a million questions about iTunes subscription, but I have some doubts.

Actually I am applying auto-renewal membership in my app and I have to make sure that I get it right. Here are the steps to know that:

  • Whenever a user buys the membership, send the server to validate the receipt to receive the server
    • if Save the receipt on the database
    • On the application load, ask the server that there is a receipt for this UDID (it is to find out that the user's Has a valid membership)
      • If so, check that the date of subscription from the date Whether or not a new item has been added to the store by the end of the date
        • If any, inform the user about some of those items in a few ways and consider them to be freely downloadable

          Are these steps correct? And if so, apple doctor says:

          In most cases, your iOS client application should not need to be replaced. In fact, your client application has been simplified now, because you can use the same code to recover auto-renewal subscriptions to recover non-consummable products. It has been described in "Restoration Transactions". Your application receives a separate transaction for each time the subscription was renewed; Your application should verify each receipt separately.

          It seems to me that I need some code to handle all the different issues I mentioned about it or I Am I completely wrong?

          Plus, how can I know about the date of the subscription? I can not find any way to get this information anywhere, can I save it to my database?

          Update:

          When I posted this question, I have removed some things. Feel free to correct me if I make a mistake.

          First of all I think that I want to store the membership length somewhere on my database, because as stated on Apple's docs, You can not get it in any way through the web services of Apple. In fact, each membership length has a different product identifier, so you should have a way to convert a product identifier to membership length.

          Additionally, Sylvia has given information about the implementation of automatic renewable membership, so at least I know that my thinking was not very defective.

          Now there is only one problem: How do I know if a user has a legitimate membership? I can store this information on my server, but how do I user a complete transaction? Should I Need UDID Tool?

          We have implemented app purchases and especially new auto-renewal products in our company. / P>

          This application transmits the transaction receipt to our website, we apply it properly if we handle it correctly and Apple can verify it. In that case, we have updated the user account (i.e. database) to update "yes, he has paid and his membership is valid until the date of receipt".

          After recovering for this webservice, the application reloads the account information through another website, and see that there is a valid subscription. That was ... until the automatic renewable products appeared.

          We now have to implement some Cron jobs that run every day: Every day we make a list of those who are about to expire, and we ask Apple if the original receipt is still valid : The magic thing is that in their answer, there is a field latest-receipt that embeds the latest receipt if we do not have the same, we understand The subscription that has been automatically renewed, we Krone the latest receipt accumulated to investigate, and we update to extend the expiry date of the user account.

          Hope it helps.

Comments