Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. I have users (login, registration) and I want to connect it with IAPs (via my server). I can use original_transaction_id and it's okay for purchase/restore IAPs and have it on other devices with same account.

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. So how would you fix it? Is it possible? Or should I change it to consumable IAP? Or it's just problem that no one carres?

Thanks

like image 474
Libor Zapletal Avatar asked Aug 11 '17 08:08

Libor Zapletal


1 Answers

The problem is that you are trying to tie an IAP to your own account system. 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.

Using consumable IAPs to circumvent this "problem" is not the way to go if the nature of the IAP is not consumable (like coins). The type of IAP should really reflect the kind of value you are offering to the user.

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. 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.

like image 179
Kymer Avatar answered Oct 17 '22 23:10

Kymer