3

I have to implement Auto Renewing Subscription logic to my app, and as this is first time I'm doing it I'm not sure have I figured out everything correctly. Buying Subscription is easy, but what is bugging me is checking status of user's subscription, i.e. knowing if user has subscription or not. So here is Flow Chart I've created:

Subscription check logic

Can someone please confirm to me that this flow is correct?

And one more thing which is bugging me:

If user has purchased 30 day renewable subscription, then he will be presented with e-mail/pass dialog every 30 days (because app cannot now status of the subscription unless SKReceiptRefreshRequest is called which opens up dialog) ? Or did I misunderstood something?

hyperN
  • 2,674
  • 9
  • 54
  • 92
  • 1
    You don't need to explicitly refresh the receipt, it will be refreshed when the app starts. Also, is the green box actually checking the data in the receipt? You need to check the expiration date of the subscription in the receipt in case the user has turned off auto renewal – Paulw11 Jan 12 '17 at 10:35
  • @Paulw11 So local receipt is always locally refreshed behind the scenes (i.e. it is kept in sync with Apple servers) ? I am checking expropriation date immediately (in "Local receipt exists and is valid?"). – hyperN Jan 12 '17 at 11:16
  • 1
    Yes, the receipt is refreshed for you when the subscription renews. – Paulw11 Jan 12 '17 at 11:36
  • Great, thanks for the clarification! – hyperN Jan 12 '17 at 11:37
  • 1
    You might also want to look at https://github.com/paulw11/subscription-monitor even if you don't want to use the framework my code might offer some insights. – Paulw11 Jan 12 '17 at 11:41

1 Answers1

1

Everything seems to be in proper order.

Just don't forget to add the functionality of "Restore Purchase" as this is recommended by Apple.

Vikas Dadheech
  • 1,672
  • 12
  • 23