H
harambe1
Guest
Hello! So I am trying to get my first IAP approved for my app, and I followed the documentations as close as possible. But whenever I query the products, in the IAP Async event response, the product list I receive is empty. I always assume it was only because the IAP is still not approved by the apple team.. but it turns out they need it to work even before they approve it. can anyone enlighten me on this? thanks guys.
as you can see I did a show debug message to see the size of the ds_list returned, but it is always 0.
GML:
var _eventId = async_load[? "id"];
switch (_eventId) {
case ios_product_update:
// Decode the returned JSON
var _json = async_load[? "response_json"];
var _map = json_decode(_json);
var _plist = _map[? "valid"];
var _sz = ds_list_size(_plist);
show_debug_message("RECEIVED" + string(_sz));
// Loop through all valid products and store any data that you require
for (var i = 0; i < _sz; ++i;) {
var _pmap = _plist[| i];
var _num = 0;
while(_pmap[? "productId"] != IAP_PurchaseID[_num]) {
++_num;
}
IAP_ProductData[_num, 0] = _pmap[? "productId"];
IAP_ProductData[_num, 1] = _pmap[? "price"];
IAP_ProductData[_num, 2] = _pmap[? "localizedDescription"];
IAP_ProductData[_num, 3] = _pmap[? "localizedTitle"];
}
.....