简体   繁体   English

具有自定义用户帐户管理功能的iOS非耗材IAP - 多次购买

[英]iOS Non-consumable IAP with custom user accounts management - multiple purchases

I want to have content enabled for user after he purchase it and it should be available for that user all the time. 我想在购买后为用户启用内容,并且应该始终为该用户提供。 Right way to do this is with Non-consumable IAPs. 正确的方法是使用非消耗性IAP。 I have users (login, registration) and I want to connect it with IAPs (via my server). 我有用户(登录,注册),我想与IAP(通过我的服务器)连接。 I can use original_transaction_id and it's okay for purchase/restore IAPs and have it on other devices with same account. 我可以使用original_transaction_id ,它可以购买/恢复IAP,并在其他设备上使用相同的帐户。

Now what's the problem. 现在问题是什么。 If user logouts and another user logged in which doesn't buy IAP then he can't purchase it again on that device (with that Apple account logged in device) because when app tries to buy it, it restore previous purchase and with server support it finds out that this original_transaction_id is already saved for another account. 如果用户注销和其他用户登录但没有购买IAP,那么他就无法在该设备上再次购买(该Apple帐户已登录设备),因为当应用尝试购买时,它会恢复之前的购买并获得服务器支持它发现这个original_transaction_id已经为另一个帐户保存了。 So how would you fix it? 那你怎么解决它? Is it possible? 可能吗? Or should I change it to consumable IAP? 或者我应该将其更改为可消耗的IAP? Or it's just problem that no one carres? 或者只是问题,没有人卡雷?

Thanks 谢谢

The problem is that you are trying to tie an IAP to your own account system. 问题是您正在尝试将IAP绑定到您自己的帐户系统。 Obviously iOS doesn't care about your users “logging out" of your app, as far as iOS is concerned no user-switch has happened. They are still logged in with their Apple ID on that particular device. As far as Apple is concerned: 1 device = 1 user = 1 Apple ID. 显然iOS不关心你的用户“退出”你的应用程序,只要iOS关注没有发生用户切换。他们仍然在该特定设备上使用他们的Apple ID登录。就Apple而言:1个设备= 1个用户= 1个Apple ID。

Using consumable IAPs to circumvent this "problem" is not the way to go if the nature of the IAP is not consumable (like coins). 如果IAP的性质不是消耗品(如硬币),则使用消耗品IAP来规避这个“问题”并不是要走的路。 The type of IAP should really reflect the kind of value you are offering to the user. IAP的类型应该真正反映您为用户提供的价值

Is this a problem though? 这是一个问题吗? Do you expect your users to share 1 device like that, where they would want to log in and out of your app on the fly? 您是否希望您的用户能够共享这样的设备,他们希望在那里动态登录和退出应用程序? If it is something you'd really like to address, try to inform the user as best as possible whenever you detect a duplicate transaction ID. 如果您真的想要解决这个问题,请在检测到重复的事务ID时尽可能通知用户。 You could prompt them to log out of the App Store first and explain IAPs are tied to an Apple ID and not the account from your service. 您可以先提示他们退出App Store并解释IAP与Apple ID相关联,而不是与您服务中的帐户相关联。

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

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