如何使用不续订的应用程序内购买支持多个设备? [英] How to support multiple devices with non-renewing In-App Purchase?

查看:191
本文介绍了如何使用不续订的应用程序内购买支持多个设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个iOS应用,其中包含一个不续订的IAP。 Apple在他们的 IAP概述中提供了这个金块

I'm building an iOS app that will include an IAP with a non-renewing subscription. Apple provides this nugget in their overview of IAP:



您需要向用户拥有的所有设备提供非续订订阅。 Store Kit不会自动将未续订订阅同步到所有设备;你必须自己实现这个基础设施。例如,大多数订阅由外部服务器提供;您的服务器需要实施一种机制来识别用户并将订购购买与购买它们的用户相关联。

You are required to deliver non-renewing subscriptions to all devices owned by the user. Non-renewing subscriptions are not automatically synchronized to all devices by Store Kit; you must implement this infrastructure yourself. For example, most subscriptions are provided by an external server; your server would need to implement a mechanism to identify users and associate subscription purchases with the user who purchased them.


我想遵循这条规则:我希望我的用户能够利用他们在其他设备上的一台设备上购买的订阅。那么如何在iPhone和iPad上识别同一个用户呢?我知道您不能使用Apple ID,也不能依赖注册方法。

I would like to follow this rule: I want my users to be able to take advantage of the subscription they purchase on one device on other devices as well. So how can I identify the same user across their iPhone and iPad? I understand that you can't use the Apple ID, and you can't rely on a registration method.

我刚刚发现这个问题;那里给出的答案似乎不可行。其他人必须有更优雅的东西。

I just now found this question; the answer given there doesn't appear to be workable. There must be something more elegant that others have done.

推荐答案

我从 Gavin McKenzie ,听起来像是我听过的最好的赌注:

I have a suggestion given to me from Gavin McKenzie, which sounds like the best bet I've heard:

购买订阅后,向用户提供短代码。代码也将存储在服务器上,与该用户的帐户绑定。当他们在另一台设备上点击恢复时,请从原始设备和帐户请求短代码,从而将这些设备绑在一起。

Upon purchase of the subscription, make a "short code" available to the user. The code would be stored on the server as well, tied to that user's account. When they hit Restore on another device, request the short code from the original device and account, thereby tying those devices together.

Gavin进一步建议在配对类似于蓝牙的方法:恢复时,启动设备A上的配对,生成短代码并将其推送到服务器。然后,设备B可以使用该代码。五分钟后,或者当配对屏幕被解除时,代码将被删除。

Gavin further suggested the use of this in a "pairing" method similar to Bluetooth: when restoring, initiate the pairing on Device A, which generates the short code and pushes it to the server. Device B can then use that code. Five minutes later, or when the pairing screen is dismissed, the code is deleted.

我不确定如果要恢复到相同状态,这将如何起作用设备,比如说,删除手机并恢复后。但这感觉是一个好的开始。

I'm not sure how this would stand up if you want to restore to the same device, say, after deleting the phone and restoring. But this feels like a good start.

这篇关于如何使用不续订的应用程序内购买支持多个设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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