嗨,我正在使用钛中的商店套件模块。代码工作正常,直到我添加购买产品的行我的代码如下
var Storekit = require('ti.storekit');
Storekit.requestProducts([ 'com.example.qld.inapp' ], function (evt) {
if (!evt.success) {
alert('ERROR: We were not able to get the product!');
}
else if (evt.invalid) {
alert('ERROR: We requested an invalid product!');
}
else {
alert(evt.products[0]);
Storekit.purchase(evt);
}
});
当我添加购买行时,它会出现以下错误
[ERROR] Exception in event callback: {
line = 14;
message = "*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]";
sourceId = 173081376;
sourceURL = "file://localhost/Users/aadilf/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/C7C55347-5965-4C58-9624-8A41837459D4/QLD%20Best%20Bets.app/home.js";
}
因为在我无法解决此错误之前我还没有完成目标 c