Great thread thanks.
a) Do you give a response to the user after they click “restore”? This would be ideal from a user experience point of view I assume? Assuming yes:
b) So you would implement a timeout I assume because with Apple the doco says they don’t give a response to “restore” if you don’t have any items. So therefore a “you don’t have any items to restore”.
c) following on from b) could you always assume a no-response from Apple will be due to a “restore” request? i.e. Corona’s “purchase” call always returns a response as I understand even if there is a connectivity failure
d) but if you have multiple events to the listener being triggered if you have multiple non-consumables that need to be processed (I’m assuming this is how things work), then how/when do you give the response back to the user? e.g. do you wait for the timeout period in any case and collect up what was restored (if any) so you could then present this back (e.g. you successful restored X items)?
Actually if anyone had some tried/proven pseudocode that shows how they tackled the above that would be great. Perhaps there’s an easier approach I’m missing?
EDIT:
also e) I noted the following para from the apple development forum - does this imply objective-c developers do get a response back each time for a restore of some form, but with corona we don’t?
The response from a ‘restoreCompletedTransactions’ is a call back to your delegates updatedTransactions with a set of transactions for each IAP already purchased and then a call to paymentQueueRestoreCompletedTransactionsFinished:. If you get a call to the second without a call to the first then the app knows that there were no purchases to restore.
also f) noted someone suggested the following approach - should this be ok re getting approved by Apple?
No “restore button” as such, but when you go to purchase the item offer a: “Yes”, “No thanks” or “Already purchased” set of buttons. If the user taps “Already purchased” then the app executes a restore.