简体   繁体   English

购买内置应用程序和设备令牌或Apple ID一起使用

[英]Made In app purchase Using with Device token or Apple ID

I am implementing In-App Purchase in my app and test around the existing apps to get some ideas. 我正在我的应用程序中实现应用内购买,并围绕现有应用进行测试以获取一些想法。 But I found a scenario which I am quite confused on it. 但是我发现了一个我很困惑的场景。

I have installed an iOS app and purchased the particular levels. 我已经安装了iOS应用并购买了特定级别。 Later I uninstall this app, sign out from existing iTunes store account and sign in again with another apple id, then reinstall that app again (same app). 后来我卸载了该应用程序,从现有的iTunes Store帐户注销,然后使用另一个Apple ID重新登录,然后再次重新安装该应用程序(相同的应用程序)。 Here i can again i need to purchase the particular levels.But my doubt is In-App purchase method we can use based on the purchase Apple ID or Device token ? 在这里我可以再次购买特定级别的商品。但是我怀疑是否可以根据购买的Apple ID或设备令牌使用应用内购买方式?

If the user can purchased with Apple ID ,then the user can login with another device they no need to purchased again but one user can purchase app and user can login to another users Devices is the one problem..!why because another users no need to purchase. 如果用户可以使用Apple ID购买,则该用户可以使用另一台设备登录,而无需再次购买,但是一个用户可以购买应用程序,并且该用户可以登录到另一个用户。设备是一个问题。购买。

And if we set the Device token, based on the in-app purchase user can only login that device only ,they can't login another devices with same Apple ID,here it is a problem. 而且,如果我们设置了设备令牌,则基于应用内购买用户只能登录该设备,而不能登录具有相同Apple ID的其他设备,这是一个问题。

I am quite confused on it... so is the purchased items tied on device if we use multiple apple ids on same device? 我对此非常困惑...如果我们在同一设备上使用多个Apple ID,购买的商品是否会绑在设备上?

I understand that I can restore my purchased items on different devices using same apple id. 我了解可以使用相同的Apple ID在不同的设备上恢复购买的商品。 But how about multiple apple id on multiple devices? 但是如何在多个设备上使用多个Apple ID? If I have 2 apple id associated on an device, I use one of them purchased item, but later I use these 2 apple id login to another device, am I still need to pay again to download items I have purchased on previous device? 如果我在一个设备上关联了2个Apple ID,我将使用其中一个购买的商品,但后来我使用这2个Apple ID登录另一台设备,是否仍需要再次付费才能下载在先前设备上购买的商品?

Please let me know if my questions are not clear... I hope someone can give some idea on sharing purchased items against different devices and apple ids.And which one use the in-app purchase. 如果我的问题不清楚,请让我知道...我希望有人可以针对不同的设备和Apple ID共享购买的商品,以及哪个使用应用内购买分享一些想法。

Any suggestions and comments are welcome. 欢迎任何建议和评论。 Thanks a lot. 非常感谢。

IAPs fall into two categories - consumable, and non-consumable. IAP分为两类-消耗性和非消耗性。

Non-consumable purchases (purchase level 10-15 of a game, upgrade to pro, etc) are synced across devices by the system, and are restored by the system. 非消耗性购买(游戏的购买等级10-15,升级为专业版等)由系统在设备之间同步,并由系统还原。 They are tied to the Apple ID. 它们与Apple ID绑定在一起。

Consumable purchases (purchase 5 gold coins) are NOT synced or restored. 耗材购买(购买5金币)不同步或恢复。 Your application needs to remember that the purchase has been made, and store information about that so that a backup and restore correctly restores the user's state. 您的应用程序需要记住已完成购买,并存储有关购买的信息,以便备份和还原正确地恢复用户的状态。 If the user uninstalls and then reinstalls, they have lost any previous consumable purchases (but they will retain all non-consumable purchases, and your application can query for these). 如果用户先卸载再重新安装,则他们会丢失之前的所有耗材购买(但他们将保留所有非耗材购买,并且您的应用程序可以查询这些)。 You can, of course, sync all information about consumable purchases to your own server, but you would then need to have the user create an account with you. 当然,您可以将有关耗材购买的所有信息同步到您自己的服务器上,但是随后您需要让用户与您一起创建一个帐户。 This would allow you to sync consumables between devices. 这将允许您在设备之间同步消耗品。

The Device ID (which you can't get, anyway) has no relevance. 设备ID(无论如何都无法获得)没有任何关系。

See https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Products.html for more discussion. 有关更多讨论,请参阅https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Products.html

If the IAPs are non-consumables (or autorenewables) they can be 'restored' by the user (ie the app would execute a restoreCompletedTransactions or refreshReceipt). 如果IAP是非消耗品(或自动更新),则用户可以对其进行“还原”(即,应用将执行restoreCompletedTransactions或refreshReceipt)。 I believe that the username/password log-in required to restoreCompletedTransactions (or refreshReceipt) must be the same username/password as the person who downloaded the app onto the device. 我认为,restoreCompletedTransactions(或refreshReceipt)所需的用户名/密码登录名必须与将应用程序下载到设备上的用户名/密码相同。 Given that requirement, I still believe that a single 'purchaser' can share their single purchase of a non-consumable IAP on many devices. 考虑到这一要求,我仍然相信单个“购买者”可以在许多设备上共享他们对非消耗性IAP的购买。

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

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