I have three non-consumable products. If I understood correctly, after purchase I save the info to a file that the product is bought. I can then remove the product from the ui checking the file if the user has bought the product. But can I some how check this from the App Store? Is the file neseccary?
And if the user has bought one of the three products, wipes his/her phone and restores products. How can I check what products where restored? For example if the user starts the restore process, I wipe the data from the file where I saved info about the bought products… but then I don’t know how to check what products are restored?
Look at the store.restore() API. It will return a list of all non-consumable purchased items. Apple requires this be on a button in the interface. Google doesn’t care and after a short delay (a second or two) after initializing the store, you can call store.restore().
For Google you will get new “purchased” items. For Apple, they come in tagged as “restored” in the transaction handling function.
Look at the store.restore() API. It will return a list of all non-consumable purchased items. Apple requires this be on a button in the interface. Google doesn’t care and after a short delay (a second or two) after initializing the store, you can call store.restore().
For Google you will get new “purchased” items. For Apple, they come in tagged as “restored” in the transaction handling function.