Today Apple rejected my app, because they said the IAP doesn’t showed up. I understand them, but that’s not totally true, the IAP does appear (the system dialog asking for the store password, and then the product price), but it takes too long. I’m using Cocos2d-js, and I’m not doing any fancy things, I just have an IAP product which is: “remove_ads”
I call it like this, after the parental gate is passed:
onParentalGranted: function(evt)
{
var evt = new cc.EventCustom(SHOW_WAIT_LAYER);
cc.eventManager.dispatchEvent(evt);
sdkbox.IAP.purchase("remove_ads");
}
I call an event to show a layer. The setup is done this way, in a helper.js file
sdkbox.IAP.init();
sdkbox.IAP.setListener({
onSuccess : function (product) {
//Purchase success
var evt = new cc.EventCustom(PURCHASE_COMPLETED);
cc.eventManager.dispatchEvent(evt);
},
onFailure : function (product, msg)
{
//Purchase failed
//msg is the error message
var evt = new cc.EventCustom(PURCHASE_ERROR);
cc.eventManager.dispatchEvent(evt);
},
onCanceled : function (product)
{
//Purchase was canceled by user
var evt = new cc.EventCustom(PURCHASE_CANCELLED);
cc.eventManager.dispatchEvent(evt);
},
onRestored : function (product)
{
var evt = new cc.EventCustom(PURCHASE_RESTORE);
if (product.name == PURCHASE_ID)
evt.setUserData(0);
else
evt.setUserData(1);
cc.eventManager.dispatchEvent(evt);
}
});
What can be the problem?