简体   繁体   English

iPhone - 如何识别我的应用程序的iTunes用户

[英]iPhone - How to recognize the iTunes user of my app

there are some apps that seem to recognize the iPhone's iTunes user. 有些应用程序似乎可以识别iPhone的iTunes用户。 I need to develop an app that supports In-App Purchase of kind "Subscription". 我需要开发一个支持应用内购买类型“订阅”的应用。 Apple wants that my app grants the subscription in every user's device (iPhone, iPod, iPad). Apple希望我的应用程序在每个用户的设备(iPhone,iPod,iPad)中授予订阅。 To do so I can build a server-side subscription system that binds the subscription with a kind of just created user inside my server. 为此,我可以构建一个服务器端订阅系统,该订阅系统将订阅与我服务器中刚刚创建的用户绑定。 To do things better I suppose that if my app can know the iTunes user that subscribes my service on the iPhone, it can store it inside my server. 为了做得更好,我想如果我的应用程序可以知道在iPhone上订阅我的服务的iTunes用户,它可以将其存储在我的服务器中。 If the user download the app on an iPad too, my app can ask the server to understand if the current iPad user is the same that subscribed my service on the iPhone and, if so, can grant the service on the iPad too. 如果用户也在iPad上下载应用程序,我的应用程序可以要求服务器了解当前的iPad用户是否与在iPhone上订阅我的服务相同,如果是,也可以在iPad上授予该服务。 So, can my app know what iTunes user is subscribing my service (with an In-App Purchase)? 那么,我的应用程序可以知道iTunes用户订阅我的服务(通过应用程序内购买)吗?

Thanks In Advance 提前致谢

The answer is: I CANNOT! 答案是:我不能! so the only way to manage subscriptions on multiple devices is to build a kind of "subscription registration" that lets the user to register his/her subscription so he/she can login from another devices and restore the subscription. 因此,管理多个设备上的订阅的唯一方法是构建一种“订阅注册”,让用户注册他/她的订阅,以便他/她可以从其他设备登录并恢复订阅。

The SDK agreement seems to say that your app will be rejected if you ask and require the user to send you their iTunes user account ID. SDK协议似乎表明如果您要求用户向您发送其iTunes用户帐户ID,您的应用将被拒绝。

You will have to figure out a way to use the anonymous transaction ID instead. 您将不得不找出使用匿名事务ID的方法。

You don't have to know the iTunes account for this (in fact, I think there's no way to find out in a documented way). 您不必知道iTunes帐户(实际上,我认为没有办法以文档的方式找到)。

On every device, you can restore previous purchases by calling into the IAP service. 在每台设备上,您都可以通过调用IAP服务来恢复以前的购买。 This will return a list of previous purchases that were made using the current iTunes account. 这将返回使用当前iTunes帐户进行的先前购买的列表。 You should communicate with your app server to get the content based on these restored purchases. 您应与您的应用服务器通信,以根据这些恢复的购买获取内容。

From the IAP Programming Guide : IAP编程指南

To restore transactions, your application calls the payment queue's restoreCompletedTransactions method. 要恢复事务,应用程序将调用支付队列的restoreCompletedTransactions方法。 For each nonconsumable purchase that was previously completed, the App Store generates a new restore transaction. 对于先前已完成的每次非消费性购买,App Store会生成新的恢复事务。 The restore transaction includes a copy of the original transaction. 还原事务包括原始事务的副本。 Your application processes restore transactions by retrieving the original transaction and using it to unlock the purchased content 您的应用程序进程通过检索原始事务并使用它来解锁已购买的内容来还原事务

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM