Hi,
my app has been rejected because there is no “restore” IAP button. I create one and it works fine,… except when there is nothing to restore. Actually the store.init() doesn’t get called at all… Is there a way to fix that ?
Hi,
my app has been rejected because there is no “restore” IAP button. I create one and it works fine,… except when there is nothing to restore. Actually the store.init() doesn’t get called at all… Is there a way to fix that ?
Hi there,
You have to call store.init() yourself before you call store.restore(). If you try to call store.restore() first, nothing will happen, which it sounds like is what you’re experiencing.
In fact i just want to pop a message up when the user touch the restore button and has nothing to restore. When he has purchased something, all is fine and i can do something after the transaction.state has matched on “restored”. But when he hasn’t, nothing happend and i don’t know how to catch this other state…
OK, I see what you mean now. So when you call store.restore() for a user who hasn’t previously purchased anything, you’re saying that your callback function doesn’t fire at all? I could maybe understand if it doesn’t fire with a “restore” transaction type, but I would think it would still fire with some minimal (perhaps mostly empty) table. It doesn’t?
OK, I see what you mean now. So when you call store.restore() for a user who hasn’t previously purchased anything, you’re saying that your callback function doesn’t fire at all?
Yes…
here’s another topic about this : http://developer.coronalabs.com/forum/2012/06/27/storerestore-doesnt-call-back-if-there-no-items-restore
Hi there,
You have to call store.init() yourself before you call store.restore(). If you try to call store.restore() first, nothing will happen, which it sounds like is what you’re experiencing.
In fact i just want to pop a message up when the user touch the restore button and has nothing to restore. When he has purchased something, all is fine and i can do something after the transaction.state has matched on “restored”. But when he hasn’t, nothing happend and i don’t know how to catch this other state…
OK, I see what you mean now. So when you call store.restore() for a user who hasn’t previously purchased anything, you’re saying that your callback function doesn’t fire at all? I could maybe understand if it doesn’t fire with a “restore” transaction type, but I would think it would still fire with some minimal (perhaps mostly empty) table. It doesn’t?
OK, I see what you mean now. So when you call store.restore() for a user who hasn’t previously purchased anything, you’re saying that your callback function doesn’t fire at all?
Yes…
here’s another topic about this : http://developer.coronalabs.com/forum/2012/06/27/storerestore-doesnt-call-back-if-there-no-items-restore