gpt4 book ai didi

ios - 如何知道 iOS 应用程序提供试用版

转载 作者:行者123 更新时间:2023-11-28 20:52:39 25 4
gpt4 key购买 nike

我们的应用程序中有“免费试用”按钮。我想知道如何知道可以试用。

我对遵循文档中的文本有点怀疑:

New and resubscribing customers are eligible to pay one discounted price or free trial per subscription group.

什么是“重新订阅”?过去订阅过的客户可以再次试用吗?

是否可以使用 StoreKit 确定现在可以试用?

检查 SKProductintroductoryPrice 属性是否正确:https://developer.apple.com/documentation/storekit/skproduct/2936878-introductoryprice

我还有一个想法,要求后端提供当前用户的所有订阅历史记录,如果用户还没有试用,则显示“免费试用”。但正如我所说,我不确定“重新订阅”。

最佳答案

检查试用资格的正确方法是按照以下 Apple 所述验证收据文件。由于大多数人会认为这是一个非关键验证,因此在客户端而不是在服务器外进行验证以节省网络调用并没有太大危害。假收据可能造成的最严重危害是更改按钮的文本。

Determine Eligibility

To determine if a user is eligible for an introductory price, check their receipt: Validate the receipt as described in Validating Receipts With the App Store. In the receipt, check the values of the Subscription Trial Period and the Subscription Introductory Price Period for all in-app purchase transactions. If either of these fields are true for a given subscription, the user is not eligible for an introductory price on that subscription product or any other products within the same subscription group. You typically check the user's eligibility from your server. It's best to determine eligibility early—for example, on the first launch of the app, if possible.

Based on the receipt, you will find that new and returning customers are eligible for introductory price or free trial discounts as follows: New subscribers are always eligible. Lapsed subscribers who renew are eligible if they haven't previously received an introductory price for the given product (or any product within the same subscription group).

回答您的具体问题:

Can customers who has subscription in the past have trial again?

没有。这是 Apple 对同一订阅组中的任何产品强制执行的。例如,如果用户开始试用“月度产品”,然后取消,然后购买“年度产品”,他们将没有资格获得免费试用。

Is it possible to use StoreKit to figure out that trial is available now? Is it correct to check introductoryPrice property of the SKProduct?

没有。 SKProduct 将始终显示相同的促销价。

关于ios - 如何知道 iOS 应用程序提供试用版,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56234350/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com