question

Jon R. Helms avatar image
Jon R. Helms asked

Get Subscription Expiration Date - IAP 2.0

How can I get the date an IAP subscription is set to expire? I would like to store this value so that if the app is opened offline the app can use the stored expiration date. I will likely need this value on more devices than just the one it is purchased on as I expect most users of my app to have multiple devices. I'm using IAP 2.0 and I see that in 1.0 receipt had a getSubscription() method, but I don't see that in the current code.
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Nick Gardner avatar image
Nick Gardner answered
Hi, The information for an IAP subscription expiration is not contained in the response. If there is no internet connection, the suggested method would be to simply cache the purchase for a reasonable period of time (maybe 1-2 weeks), and then tell the user they need an internet connection beyond that. Thanks, Nick
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.