Hello! You mean this line?
if event.transaction.productIdentifier == "whiskey\_bottle" then native.showAlert( "Shop", "Thank you! Purchase \<Whiskey bottles\> has been restored!", { "OK" }) whiskey:set("whiskey", "yes") whiskey:save() end
if yes, then i use GGData to save some data, and i called a file that controls whiskey bottle just “whiskey”
And in event.transaction.productIdentifier my product is “whiskey_bottle” because i registered my in-app purchase in iTunes Store this way, “whiskey_bottle”)
So if i understand right i should use the name exactly the same as i used when i registered in-app in iTunes Store?
Apple told me this, when i asked them about what items should be restored:
"Thank you for your inquiry.
Consumable products are purchased each time the user needs the item. Non-consumable products are only purchased once by users and are always available on all devices that are associated with that user’s iTunes account.
As specified in the In-App Purchase Programming Guide:
“…if your application supports product types that must be restorable, you must include an interface that allows users to restore these purchases. This interface allows a user to add the product to other devices or, if the original device was wiped, to restore the transaction on the original device.”"
I guess that my bottles, which user can buy, should be restored if device is wiped. But they are none-consumable.
And i can’t post here any logs because my app don’t even reach the state “restored”.
Thank you