如何恢复耗材应用内购买? [英] How to restore a Consumable In app Purchases?

查看:120
本文介绍了如何恢复耗材应用内购买?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一款iOS游戏,用户可以通过耗材购买应用程序购买一定数量的内部货币(比如1000金币)。

I'm developing an iOS game where the users can buy some amount of internal currency (say 1000 golds) by a Consumable In App Purchase.

如果用户想要将余额从一台设备转移到另一台设备,如何恢复耗材购买?

How to restore a Consumable Purchase if the users want to transfer their balance from one device to another?

在Apple的文档中,它说我们必须使用自己的服务器。但是如何获得用户的Apple ID?或者可能有其他方法来跟踪消费品购买?

In Apple's docs it says that we have to use our own server. But how to get user's Apple IDs? Or may be there is some other way to track consumable purchases?

推荐答案

如果您想要做的是分享产品用户购买不同的设备;您需要:

If what you want to do is to share the products the user buys across different devices; you will need to:


  1. 将游戏状态保留在服务器中并从设备中获取。

  1. Keep the game state in the server and obtain it from the device.

以某种方式识别用户,即用户名/通行证。

Identify users somehow, i.e. username/pass.

每次用户购买/消费/获取产品时更新服务器中的游戏状态

Update the game state in the server each time the user buys/consumes/gains products

如果您只需要在同一台设备上的不同安装中共享状态,您只需使用设备ID来识别用户。

If you only need to share state across different installs on the same device, you could just use the device ID to identify the user.

这篇关于如何恢复耗材应用内购买?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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