[SOLVED] Crash ios app when setListener SDKBOX IAP

[SOLVED] Crash ios app when setListener SDKBOX IAP
0.0 0


Hi guys,
I have a bug on ios. When I call setListener for the IAP plugin and next I call cc.game.restart() => the game has crashed.

this my code:
onSuccess : function (product) {
onFailure : function (product, msg) {
//seft.onFailure(product, msg);
onCanceled : function (product) {
onRestored : function (product) {
onProductRequestSuccess : function (product) {
onProductRequestFailure : function (msg) {

this sreenshot for bug:

tks lot,


@nite help me?


@yinjimmy help me, please?


i have a solution, helpful for u!

i register listener IAP in onEnter() function and remove listener IAP in onExit() function


@mailaminh12 tks your solution,

i will try it :+1:


as mailaminh12 said, clean the listener before call cc.game.restart().

for example:



tks, i solved it