从付费应用到应用内购买?如何确定哪些用户付费?(复制)

时间:2022-04-30 15:22:56

This question already has an answer here:

这个问题已经有了答案:

I think I remember reading somewhere that there's a way to detect whether a user has paid for your app or not.

我记得我在某处读到过,有一种方法可以检测用户是否为你的应用付费。

I'm considering changing from paid to in-app purchase, and wanted to know how I could check whether a user has previously paid, and thus should receive all in-app purchases for free.

我正在考虑从付费到应用内购买,我想知道如何检查用户是否已经付费,从而可以免费收到所有的应用内购买。

2 个解决方案

#1


2  

You can go through the keychain to securely log your user's 'paying customer' status, but it does require first updating your app to implement keychain access and store user information before making the leap.

您可以通过密钥链来安全地记录用户的“付费客户”状态,但它确实需要首先更新应用程序来实现密钥链访问和存储用户信息。

See our blog article about merging our paid and free app into one free, IAP enabled app here.
We detail the process of making sure paying customers retain all privileges when moving to the IAP enabled new app.

请参阅我们关于将付费和免费应用程序合并到一个免费的IAP支持的应用程序的博客文章。我们详细介绍了在迁移到启用IAP的新应用程序时确保付费用户保留所有特权的过程。

#2


0  

You can save the version of your app and determine if it's the old one (paid) or the new one. But you have to do this before switching to in-app purchase.

你可以保存你的应用的版本,然后决定是旧的(付费的)还是新的。但在切换到应用内购买之前,你必须这么做。

Or if you have anything set in the user defaults(and you can guarantee that anyone with older versions has it set up) , you can check if that objectForKey is present (returns anything else from nil) and consider that that user has made an update. And consider a new install else.

或者,如果在用户默认设置中有任何设置(并且您可以保证任何具有较早版本的人都设置了它),您可以检查objectForKey是否存在(从nil返回任何其他内容),并考虑该用户已经进行了更新。并考虑新的安装。

#1


2  

You can go through the keychain to securely log your user's 'paying customer' status, but it does require first updating your app to implement keychain access and store user information before making the leap.

您可以通过密钥链来安全地记录用户的“付费客户”状态,但它确实需要首先更新应用程序来实现密钥链访问和存储用户信息。

See our blog article about merging our paid and free app into one free, IAP enabled app here.
We detail the process of making sure paying customers retain all privileges when moving to the IAP enabled new app.

请参阅我们关于将付费和免费应用程序合并到一个免费的IAP支持的应用程序的博客文章。我们详细介绍了在迁移到启用IAP的新应用程序时确保付费用户保留所有特权的过程。

#2


0  

You can save the version of your app and determine if it's the old one (paid) or the new one. But you have to do this before switching to in-app purchase.

你可以保存你的应用的版本,然后决定是旧的(付费的)还是新的。但在切换到应用内购买之前,你必须这么做。

Or if you have anything set in the user defaults(and you can guarantee that anyone with older versions has it set up) , you can check if that objectForKey is present (returns anything else from nil) and consider that that user has made an update. And consider a new install else.

或者,如果在用户默认设置中有任何设置(并且您可以保证任何具有较早版本的人都设置了它),您可以检查objectForKey是否存在(从nil返回任何其他内容),并考虑该用户已经进行了更新。并考虑新的安装。