It looks like you're new here. If you want to get involved, click one of these buttons!
function onTransaction(event) if event.transaction.state == StoreKit.FAILED then AlertDialog.new("error ",event.errorDescription , "Ok"):show() else if event.transaction.state == StoreKit.RESTORED then AlertDialog.new("title", "You had restored UnlockStages", "Ok"):show() end sceneManager:changeScene("optionScreen", 1, SceneManager.fade, easing.linear) end storekit:finishTransaction(event.transaction) storekit:removeEventListener(Event.RESTORE_TRANSACTIONS_COMPLETE, onTransaction) end if application:getDeviceInfo() == "iOS" then storekit:addEventListener(Event.RESTORE_TRANSACTIONS_COMPLETE, onTransaction) end storekit:restoreCompletedTransactions()
Comments
And is there any error message? At least is it a Lua crash or native crash?
it's native crash
when i call storekit:restoreCompletedTransactions() my game crash
and also i have put alertDialog in onTransaction to know error but it's not working