ios7中的自动续订订阅 [英] Auto-renewable subscription in ios7

查看:457
本文介绍了ios7中的自动续订订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道它被多次询问,但没有一个问题对我有帮助,我不确定哪些答案在iOS 7中仍然有效。

I know it has been asked many times but none of the questions are helping me and I am not sure which of these answers are still valid in iOS 7.

我正在使用Auto-Renewing订阅做一些应用程序。我已经成功创建了我的产品,我可以和测试用户一起购买。

I am doing some app with Auto-Renewing subscription. I have successfully created my product and I can buy it with test users.

我的问题是:检查特定用户是否仍然可以访问此产品的正确方法是什么?

My question is: What is the right way to check if a particular user still has access to this product?

如何测试自动续订是否运行良好? (因为我读到沙盒中的自动续订不能像真正的iStore那样工作)。

And how to test if auto-renewing is working well? (Since I read that in sandbox auto-renewing does not work as real iStore).

最后一个问题是:Apple拒绝大量ARS应用程序仍然是真的吗?

Last question is: Is it still true that Apple rejects a lot of ARS apps?

Marko

推荐答案

检查用户是否仍有权访问您应该存储在付款期间收到的收据数据的产品,并使用应用程序商店服务检查收据。

To check if a user still has access to the product you should store the receipt data you received during the payment and check that receipt with the app store service.

应用程序商店服务将回复您收据的状态(0表示有效收据,21006表示订阅已过期且未续订,等等)

The app store service will reply with a status for your receipt (0 for valid receipt, 21006 if the subscription has expired and was not renewed, etc)

带有示例代码的流程可在此处找到:

The process with sample code can be found here :

https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW3

回答你的上一个问题:是Apple拒绝了很多ARS应用程序,它只适用于内容应用程序(杂志,报纸,视频等)。例如,如果您提供服务,例如dropbox,则您的应用不符合ARS条件

To answer your last question : Yes Apple rejects a lot of ARS apps, it only works for content apps (magazine, newspaper, videos, etc). For example if you offer a service such as dropbox your app is not eligible to ARS

在我们的案例中,我们正在分发图书订阅服务,验证应用程序Apple问我们每个月有多少新内容可供用户使用。

In our case we are distributing a book subscription service, to validate the app Apple asked us how many new content is available to users every month.

编辑

对于iOS 7,状态0代表有效收据,即使它已过期:

For iOS 7 status 0 represents a valid receipt even if it's expired :


适用于iOS 7风格应用收据,状态代码反映了整个应用收据的状态
。例如,如果您发送包含过期订阅的有效app
收据,则响应为0
,因为整个收据有效。

For iOS 7 style app receipts, the status code is reflects the status of the app receipt as a whole. For example, if you send a valid app receipt that contains an expired subscription, the response is 0 because the receipt as a whole is valid.

您需要验证latest_receipt_info expires_date。

You need to verify the latest_receipt_info expires_date.

这篇关于ios7中的自动续订订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆