在应用内购买,多个自动更新订阅有不同的持续时间。

时间:2023-01-12 22:11:11

A question regarding in-app purchase auto-renewing subscriptions:

一个关于内购自动更新订阅的问题:

I'm unclear how to handle the case where a user purchases multiple subscriptions of differing durations. It seems that Apple will recognize if the user has already purchased a given SKU (based on product-id) and prevent re-purchasing (my app gets a failed-transaction event in this case), but if I offer the same content using different product-ids having different durations, then the user can potentially purchase twice or more.

我不清楚如何处理用户购买不同时间的多个订阅的情况。看来,苹果将会认识到如果用户已经购买了一个给定的SKU(基于产品id),防止不得不再买(我的应用程序会失败的事务事件在这种情况下),但是如果我使用不同的产品id提供相同的内容在不同的时间,然后,用户可以购买两次或更多。

Even if I hide the additional purchase options once the user has subscribed once, they could potentially buy another subscription on an alternate device, and that purchase would/could ultimately be restored to the other device already having a subscription.

即使我在用户订阅了一次之后隐藏了额外的购买选项,他们可能会在另一个设备上购买另一个订阅,并且最终将会恢复到已经订阅的其他设备。

Am I supposed to track purchased subscriptions by transaction-ID and product-ID, and calculate an ultimate expiration date? That seems complicated.

我是否应该通过事务id和产品id跟踪购买的订阅,并计算最终的截止日期?这似乎很复杂。

2 个解决方案

#1


11  

Before I proceed, please see the comments on this linked post on why it may be a bad idea to use auto-renewing subscriptions.

在我开始之前,请查看关于这个链接的帖子的评论,为什么使用自动更新订阅可能是个坏主意。

Stop me if you've heard this before.
When you choose Auto-Renewable Subscriptions in iTunes Connect, you are given the opportunity to add multiple durations, with different Product ID's to one subscription Family. Apple won't allow a user to purchase multiple, overlapping subscription durations within one family. (If you're using multiple families in your app, please explain the reasoning, so I can give you guidance based on that).

如果你以前听过,就阻止我。当您在iTunes Connect中选择自动更新订阅时,您将有机会添加多个持续时间,不同的产品ID可以添加到一个订阅家庭。苹果公司不会允许用户在一个家庭中购买多个重复的订阅时间。(如果你在你的app中使用多个家庭,请解释原因,我可以基于此给你指导)。

In fact, Apple won't let the user stack different durations of a subscription within one family.

事实上,苹果公司不会让用户在一个家庭中使用不同的订阅时间。

Here's an example.
I (as a user) download the hypothetical Acme app and subscribe with a 1-month subscription. If I do nothing, my subscription will automatically renew at the end of the period with another 1-month subscription. And so on.

这是一个例子。我(作为用户)下载假设的Acme应用程序并订阅1个月的订阅。如果我什么都不做,我的订阅将在结束时自动续订,并订阅1个月。等等。

But instead I go back in and purchase a 6-month subscription. Apple will tell me (with an alert) that my 6-month subscription will begin at the completion of my current 1-month subscription, and would I like to proceed. If I say yes, Apple will make note of it, but they won't charge me until my current 1-month is up.

但我还是回去买了一个6个月的订阅。苹果公司会告诉我,我的6个月的订阅将在我完成1个月的订阅后开始,我想继续。如果我说“是”,苹果会注意到它,但他们不会对我收费,直到我现在的1个月。

Now if I go back in again and purchase a 1-year subscription, then again Apple would respond with an alert telling me that it will begin at the end of my current 1-month subscription. It won't get added to the upcoming 6-month subscription. It will replace it.

现在,如果我再次返回,购买1年的订阅,苹果会再次提醒我,它将在我当前订阅的1个月的末尾开始。它不会被添加到即将到来的6个月的订阅中。它将取代它。

In Summary
So a user can only have one Current subscription and one Upcoming subscription (within a family. This is why you use a Family of product durations within a subscription. If you create multiple subscription families then they can exist simultaneously, and you loose that protection.

总之,用户只能有一个当前订阅和一个即将到来的订阅(在一个家庭中)。这就是为什么在订阅中使用一个产品系列的原因。如果你创建了多个订阅家庭,那么他们就可以同时存在,你就会失去这种保护。

If, as a developer, you'd like to manually extend, shorten, cancel or stack subscriptions, you should be doing it with Non-Renewing Subscriptions. And if you read the link I posted at the top, you'll realize that Apple may force you to do that.

如果作为开发人员,您希望手动扩展、缩短、取消或堆栈订阅,那么您应该使用非更新订阅。如果你读了我贴在上面的链接,你会发现苹果可能会强迫你这样做。

#2


0  

try using MKStoreKit 4, it has support for auto renewable subscriptions http://blog.mugunthkumar.com/coding/mkstorekit-4-0-supporting-auto-renewable-subscriptions/

尝试使用MKStoreKit 4,它支持自动更新订阅http://blog.mugunthkumar.com/coding/mkstorekit-4- supporting-auto-可更新-subscriptions/。

#1


11  

Before I proceed, please see the comments on this linked post on why it may be a bad idea to use auto-renewing subscriptions.

在我开始之前,请查看关于这个链接的帖子的评论,为什么使用自动更新订阅可能是个坏主意。

Stop me if you've heard this before.
When you choose Auto-Renewable Subscriptions in iTunes Connect, you are given the opportunity to add multiple durations, with different Product ID's to one subscription Family. Apple won't allow a user to purchase multiple, overlapping subscription durations within one family. (If you're using multiple families in your app, please explain the reasoning, so I can give you guidance based on that).

如果你以前听过,就阻止我。当您在iTunes Connect中选择自动更新订阅时,您将有机会添加多个持续时间,不同的产品ID可以添加到一个订阅家庭。苹果公司不会允许用户在一个家庭中购买多个重复的订阅时间。(如果你在你的app中使用多个家庭,请解释原因,我可以基于此给你指导)。

In fact, Apple won't let the user stack different durations of a subscription within one family.

事实上,苹果公司不会让用户在一个家庭中使用不同的订阅时间。

Here's an example.
I (as a user) download the hypothetical Acme app and subscribe with a 1-month subscription. If I do nothing, my subscription will automatically renew at the end of the period with another 1-month subscription. And so on.

这是一个例子。我(作为用户)下载假设的Acme应用程序并订阅1个月的订阅。如果我什么都不做,我的订阅将在结束时自动续订,并订阅1个月。等等。

But instead I go back in and purchase a 6-month subscription. Apple will tell me (with an alert) that my 6-month subscription will begin at the completion of my current 1-month subscription, and would I like to proceed. If I say yes, Apple will make note of it, but they won't charge me until my current 1-month is up.

但我还是回去买了一个6个月的订阅。苹果公司会告诉我,我的6个月的订阅将在我完成1个月的订阅后开始,我想继续。如果我说“是”,苹果会注意到它,但他们不会对我收费,直到我现在的1个月。

Now if I go back in again and purchase a 1-year subscription, then again Apple would respond with an alert telling me that it will begin at the end of my current 1-month subscription. It won't get added to the upcoming 6-month subscription. It will replace it.

现在,如果我再次返回,购买1年的订阅,苹果会再次提醒我,它将在我当前订阅的1个月的末尾开始。它不会被添加到即将到来的6个月的订阅中。它将取代它。

In Summary
So a user can only have one Current subscription and one Upcoming subscription (within a family. This is why you use a Family of product durations within a subscription. If you create multiple subscription families then they can exist simultaneously, and you loose that protection.

总之,用户只能有一个当前订阅和一个即将到来的订阅(在一个家庭中)。这就是为什么在订阅中使用一个产品系列的原因。如果你创建了多个订阅家庭,那么他们就可以同时存在,你就会失去这种保护。

If, as a developer, you'd like to manually extend, shorten, cancel or stack subscriptions, you should be doing it with Non-Renewing Subscriptions. And if you read the link I posted at the top, you'll realize that Apple may force you to do that.

如果作为开发人员,您希望手动扩展、缩短、取消或堆栈订阅,那么您应该使用非更新订阅。如果你读了我贴在上面的链接,你会发现苹果可能会强迫你这样做。

#2


0  

try using MKStoreKit 4, it has support for auto renewable subscriptions http://blog.mugunthkumar.com/coding/mkstorekit-4-0-supporting-auto-renewable-subscriptions/

尝试使用MKStoreKit 4,它支持自动更新订阅http://blog.mugunthkumar.com/coding/mkstorekit-4- supporting-auto-可更新-subscriptions/。