Tracking IAP subscriptions

89 Views Asked by At

IAP was implemented in my CodenameOne application. I followed Steve Hannah's blog post Auto-Renewing Subscriptions in iOS and Android.

Hope many application instances will be installed. All applications send data to the same database table. What is the key to differentiate user subscriptions?

THX. Péter

1

There are 1 best solutions below

0
Shai Almog On

I suggest looking at the server sample as IAP is pretty hairy on that side of the fence. E.g. here Steve stores a username from your side: https://github.com/shannah/cn1-iap-demo-server/blob/master/src/main/java/com/codename1/demos/iapserver/Receipts.java#L31

Notice that your app will need a unique identifier and login system. As Apple requires the ability to restore purchases so you need to store information about the current user somewhere so you can restore the purchase on a different device.