即使在用户重新安装后,也可以限制iOS App [英] Limit iOS App even after the user re-installs it

查看:212
本文介绍了即使在用户重新安装后,也可以限制iOS App的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个应用程序,在第一次启动时为用户提供3个硬币。

一旦用户完成3个硬币,他应该通过应用内购买购买无限金币。

问题是,如果用户不想购买无限量硬币,他可以删除应用程序,再次安装应用程序,他将再次拥有3个硬币。
他可以永远这样做,而无需购买应用内购买。


有一个简单的防止这种情况的方法?即使删除了用户,我怎么知道用户是否在应用程序内完成了硬币?

I created an app that gives the user 3 coins at the first launch.
Once the user finished the 3 coins he should buy unlimited coins by an In-App purchase.
The problem is that if the user doesn't want to buy unlimited coins he can delete the app, install the app again and he will have again the 3 coins again.
And he can do this forever without ever buying the In-App purchase.

Is there a simple way to prevent this? How can I know if a user finished the coins inside the app even after deleting it?

推荐答案

你可以在一个用户处理这个问题两种不同的方式。

You can handle this problem in a two different way.

方法1:在KeyChain中存储标识


  1. 如果用户已经安装了
    ,首先检查钥匙串中的值此设备上的应用程序与否。

  2. 如果是第一次安装,则提供免费硬币并将用户ID /标记存储在钥匙串中以识别将来的安装。

  1. First check the value from keychain if the user already installed the app on this device or not.
  2. If it is first time install then provide the free coins and store the user id/flag in the keychain to identify future install.




如果用户重置设备,您将丢失此钥匙串数据。

You will lose this keychain data, if user reset their device.

重置设备后,您将再次提供硬币,因为您的标记/标识符不会出现在钥匙串中。

After reset the device you will provide the coins again because your flag/identifier will not be there in the keychain.

如果你想避免这种情况,你必须采用第二种方法。

If you want avoid this situation then you have to go with the second approach.

接近2:在服务器上存储标识符

而不是将详细信息存储在设备密钥链中。您必须将其保存在您的服务器上。应用程序首次启动时,您必须检查您的服务器以提供详细信息。

Instead of storing the details on the device keychain. You have to save it on your server. App first launch you have to check with your server to provide the details.


这种方法即使用户重置设备也能正常工作

This approach always works even user reset their device

这篇关于即使在用户重新安装后,也可以限制iOS App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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