iOS沙箱环境自动续订订阅 [英] iOS sandbox environment auto-renewal subscription

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

问题描述

我对iOS自动续订订阅有以下问题

I have the following questions regarding iOS auto-renewable subscriptions

a)自动续订订阅是否真的在沙盒环境中自动续订?问题似乎是订阅不会自动续订,尽管文档说即使在沙箱环境中它也应该发生6次。

a) Are auto-renewal subscriptions really auto-renewing in the sandbox environment? The problem seems to be that subscriptions are not renewed automatically although the documentation says that even in sandbox environment it should happen 6 times.

b)我们是否需要调用restoreCompletedTransactions获取自动扩展订阅的新收据,或者是-paymentQueue:updatedTransactions:iOS自动调用的方法? (我猜它会自动调用'启动'和'旋转出背景'不确定)

b) Do we need to call restoreCompletedTransactions to get new receipt for automatically extended subscription, or is -paymentQueue:updatedTransactions: method called automatically by iOS? (I guess it automatically called on 'launch' & 'rotation out of background' not sure)

c)你如何在多个设备上处理相同的订阅?这可以通过restoreCompletedTransactions来处理,但调用它会提示用户输入密码,因此每次应用程序启动时调用它都不是很方便。

c) How have you handled the same subscription on multiple devices? This can be handled by restoreCompletedTransactions, but calling it will prompt users password, so it is not very handy to call it every time the app starts.

推荐答案

a)沙箱环境中的自动续订订阅不一致。有时订阅会在结束前多次续订(约5次)。其他时候它根本不会续订。

a) Auto-renewing subscriptions are inconsistent in the sandbox environment. Sometimes a subscription will renew multiple times (about 5) before ending. Other times it won't renew at all.

b)(仅限iOS6交易收据)您无需致电 restoreCompletedTransactions 检查订阅的状态如果您正在存储以前的收据(最好是在您的服务器上)。只需获取您为该用户存储的任何订阅收据,并将其提交到App Store进行验证。他们将使用 latest_receipt_info 回复,包括 expires_date ,您可以使用它来确定当前的订阅状态。

b) (iOS6 transaction receipts only) You don't need to call restoreCompletedTransactions to check the status of a subscription if you're storing previous receipts (preferable on your server). Just take any subscription receipt you've stored for that user and submit it to the App Store for verification. They'll respond with the latest_receipt_info including the expires_date which you can use to determine current subscription status.

c)您应该提示新用户恢复以前的购买,此时您调用restoreCompletedTransactions。然后将其中一个收据(最好是从您的服务器)提交到App Store进行验证,以获得有关交易的已解码详细信息。在收据信息中查找密钥 original_transaction_id 。这将始终包含此用户第一次向您发起订阅时的ID。如果您将此ID与系统中的其他ID进行比较,则应该能够确定哪些设备共享Apple帐户。 (由于Apple不允许您查看用户的Apple ID,因此这是识别跨多个设备的帐户的最佳方式。)

c) You should prompt new users to "Restore Previous Purchases" at which point you call restoreCompletedTransactions. Then submit one of those receipts (preferably from your server) to the App Store for verification to get decoded details about the transaction. Look for the key original_transaction_id in the receipt info. This will always contain the id of the very first time this user initiated a subscription with you. If you compare this ID to others in your system, you should be able to determine which devices share an Apple account. (Since Apple doesn't allow you to see a user's Apple ID, this is the best way to identify an account that spans multiple devices).

与此问题类似:
iOS自动续订已过期当前订阅期结束

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

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