Hello! I have problems with InAppDemo example - i carefully entered all my info from itunesconnect and i can easily buy any item, but when i tap Restore btn, state text in bottom left corner says that “Test restore failure” and only after this it asks me to enter my test user Apple ID and password. And of course, when i enter them, nothing happens.
Can somebody from stuff reply on this one? This is really big issue for me, Apple still rejecting my app because of this.
I think the sample app says “Test restore feature”, not “Test restore failure”, right? I just want to make sure we’re talking about the same thing.
After you initiate the restore and enter your test account email and password, you said “nothing happens”. Have you looked at the console output using XCode? The restore functionality in the sample app doesn’t do anything other than print out the information that’s passed to your transaction listener. It’s still up to you to handle that information and unlock the restored product.
If you’re not familiar with reading the console output, read this blog post: http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/
- Andrew
Hi barmyman!
I was also trying the InAppPurchase example code and I am not sure if this is the same issue. But maybe it can help you in your effort… (this is for the Apple appstore)
If you make a transaction that fails for some reason, the example code will give you a run time error. The reason is that it tries to set:
descriptionArea.text = infoString
in the function:
function transactionCallback( event )
When you init the store (this takes also takes care of unfinished transcations) in last lines code the function above is used as the callback, but The descriptionArea is set as a textBox in a function that is called after the init in the delayed function “setupMyStore”. The error hinders the the transactionCallback to perform the last line of code:
store.finishTransaction( event.transaction )
I solved this by commenting out all descriptionArea.text in the function transactionCallback. Then the finishTransaction is called and receipts and other information became correct. After this all was well and good.
Hope this helps you.
Can somebody from stuff reply on this one? This is really big issue for me, Apple still rejecting my app because of this.
I think the sample app says “Test restore feature”, not “Test restore failure”, right? I just want to make sure we’re talking about the same thing.
After you initiate the restore and enter your test account email and password, you said “nothing happens”. Have you looked at the console output using XCode? The restore functionality in the sample app doesn’t do anything other than print out the information that’s passed to your transaction listener. It’s still up to you to handle that information and unlock the restored product.
If you’re not familiar with reading the console output, read this blog post: http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/
- Andrew
Hi barmyman!
I was also trying the InAppPurchase example code and I am not sure if this is the same issue. But maybe it can help you in your effort… (this is for the Apple appstore)
If you make a transaction that fails for some reason, the example code will give you a run time error. The reason is that it tries to set:
descriptionArea.text = infoString
in the function:
function transactionCallback( event )
When you init the store (this takes also takes care of unfinished transcations) in last lines code the function above is used as the callback, but The descriptionArea is set as a textBox in a function that is called after the init in the delayed function “setupMyStore”. The error hinders the the transactionCallback to perform the last line of code:
store.finishTransaction( event.transaction )
I solved this by commenting out all descriptionArea.text in the function transactionCallback. Then the finishTransaction is called and receipts and other information became correct. After this all was well and good.
Hope this helps you.