如何通过非续订应用内购买支持多台设备? [英] How to support multiple devices with non-renewing In-App Purchase?

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

问题描述

我正在构建一个 iOS 应用,其中将包含一个具有非续订订阅的 IAP.Apple 在他们的 IAP 概述中提供了这个金块:

<块引用><块引用>

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

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

我刚刚发现了这个问题;那里给出的答案似乎不可行.一定有其他人做过的更优雅的事情.

解决方案

我有一个来自 Gavin 的建议McKenzie,这听起来是我听过的最好的选择:

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

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

如果您想恢复到同一设备(例如,在删除手机并恢复后),我不确定这会如何.但这感觉是一个好的开始.

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:

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.

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.

解决方案

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 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天全站免登陆