• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

iOS IAP not working (returning empty list)

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.

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"];
        }

.....
as you can see I did a show debug message to see the size of the ds_list returned, but it is always 0.
 
Top