Search code examples
iosin-app-purchaseauto-renewing

How to know the current status of auto renewable in_app_purchase subscription through appStoreReceiptURL in objective c?


From this tutorial! I came to know that we can fetch the status of auto renewable subscriptions through appStoreReceiptURL.

I want to know whether the appStoreReceiptURL is automatically refreshed and when it will occur during the renewal of auto renewable subscription.

Is there any tutorials available for this in Objective C?


Solution

  • I made a class for exactly this purpose. It checks the validity of the current subscription and returns a bool value whether you want to show content or not, and also saves the current subscription info.

    Please take a look and tell me if it helped. Here is the class.

    Edit

    Yes, the user has to give the password every time the user purchases a subscription. Or else if the user deletes the app, then again installs the application. The class will know that a purchase has been made prior or not, ONLY if iTunes is logged in.

    1. To know purchases items iTunes has to be logged in from settings, hence uninstalling an app is not a problem.
    2. To purchase a product, subscription, the password is needed to enter every time by the user

    I have created this application using this class, so I can tell you, it follows the IN APP purchase guidelines by Apple. I will upload an example project in Github, soon.