Manage offline monthly subscription iap

I have implemented a monthly subscription in app purchase in my app so I need to store the response from apple when the payment for that subscription will be ok and the user can use it even if is offline. Which is the best way to manage that information knowing that response is only "ok" or "error"?


All of this is to prevent the app ask for subcription status every time is used. Also, how can be handled if the subscription has free trial?


Regards.

The response from Apple will imply an expiration date. Store that expiration date in NSUserDefaults in the app. Check that date whenever the app is run to be sure the subscription is still current. If you'd like, you can send that date from the app to your server or you can send the receipt to your server and let your server figure out the date from the receipt. It might also be helpful to store something else in NSUserDefault to be sure the user doesn't try to alter the stored expiration date. For example, you could store the receipt and decode it or you could hash the expiration date and store that hash.


A free trial doesn't alter the logic above.

Are you aware of a tutorial that explains all the new login in Subscriptions mangement in ios10 in detail? There seem to be so many tiny details that could potentially be missed.


Also: Is it absolutely necessary in having a private server for app that relies on subscriptions?

You do not need a server to handle subscriptions.

Manage offline monthly subscription iap
 
 
Q