为iOS提供自动续订订阅 [英] Delivery of auto-renewing subscriptions for iOS

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

问题描述

我发现在应用程序处于活动状态并且正在运行时,永远不会传递已过期的自动续订订阅的续订,而是在应用程序从后台或启动时唤醒时。

I am finding that the renewal of an expired auto-renewing subscription is never being delivered while the application is active and running, but rather when the application is woken up from background or on launch.

换句话说,如果您正在使用该应用程序,并且订阅到期,则在用户继续使用该应用程序时,它将不会被发送到应用程序(假设它是自动续订和有效等) 。

In other words if you are using the app, and the subscription expires, it won't be delivered to the app (assuming it is auto-renewing and valid etc) while the user continues to use the app.

Apple似乎没有记录此行为,其他有此经验的人是否可以确认?

This behaviour does not seem to be documented by Apple, can anyone else with experience of this confirm or otherwise?

显然,人们可以检测到sub已经过期,然后让用户有机会检查他们的订阅状态和restoreCompletedTransactions,这将引入新订阅 - 但我只是想知道我们是否做错了,或者是否这种行为是正常的。

Obviously one can detect that the sub has expired and then offer the user the chance to check their subscription status and restoreCompletedTransactions which will pull in the new subscription - but I'm just wondering if we're doing something wrong, or if this behaviour is normal.

谢谢。

推荐答案

是的。这也是我所经历的。
在继续之前,请参阅以下帖子,了解您可能希望远离自动续订订阅的原因:

Yes. That's what I experienced as well. Before I continue, please see the following posts on why you might want to stay away from auto-renewing subscriptions:

  • Marco Arment's piece on The limited world of auto-renewable subscriptions, and
  • The Comments on this SO Question: Auto-renewing subscription – Differences to non-renewing subscription

当您的应用变为有效状态时,这似乎会触发App Store发送任何新的自动续订订阅收据到你的应用程序。但你不应该依赖它。并且,您无需 restoreCompletedTransactions 来获取最新收据。

When your app becomes active, that does seem to trigger the App Store to send any new auto-renewing subscription receipts to your app. But you shouldn't rely on that. And, you don't have to restoreCompletedTransactions to get the latest receipts.

您可以看到我的另一个有关此主题的更多详细信息,请答案
您应该做什么(基于Apple的文档和一些实验)将收据存储在您的服务器上。然后,当您想要检查某人的订阅是否已自动续订时,请按照苹果程序使用iTunes验证其中一个收据。 Apple将回复有关该收据的信息以及该订阅中的最新收据。如果它与您发送的不同,那么您就知道发生了自动续订。

You can see another one of my answers for more detail on this subject. What you should be doing (based on Apple's documentation and some experimentation) is storing receipts on your server. Then when you want to check if a person's subscription has been auto-renewed, follow Apples procedure for verifying one of those receipts with iTunes. Apple will respond with info about that receipt as well as the latest receipt in that subscription. If it's different than the one you sent, then you know an auto-renewal has occured.

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

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