iOS - Getting expiration time of in-app subscription purchases

落花浮王杯 提交于 2019-11-28 23:29:59

问题


In my iOS app, I included in-app purchase for subscription. In order to use the app, they have to purchase the subscription and then only it will work.

I don't have any server and so I'll maintain all the data with in the app, like receipts, product details etc.

First time after purchasing the subscription, immediately, I'll send request for validation receipt. In that receipt, I'm extracting the "expires_date" value (which is in milliseconds since 1970) and converting it to date and storing it in NSUSerDefaults.

I'm getting the expired date as same date when I'm checking it. Don't know whether sandbox will send short duration date for testing purposes or will sandbox server sends expires-date only for renewed subscriptions.

How to identify the expiration date?


回答1:


The sandbox is supposed to return expiration dates in the following scheme.

This is from page 164 of the iTunes Connect Developer Guide

If it is not working this way you may want to file a bug report.



来源:https://stackoverflow.com/questions/8739116/ios-getting-expiration-time-of-in-app-subscription-purchases

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!