iap_enumerate_products

Populate a ds_list with all the currently available IAP products from the target store.

Syntax:

iap_enumerate_products();


Returns: N/A


Description

This function retrieves the list of in app purchase product ids encountered. On most platforms this will simply return the set of product ids provided through iap_activate(), but on platforms where the store provides the facility to retrieve a complete list of available products for a title then this set of product ids will include any and all available product ids for the game. The function requires that you supply a previously made ds_list (which you should clear first if it has been used for other purposes) which will be populated by the function call. Regardless of platform, if the target store is not available then it will get the product IDs from those supplied when you activated purchases using iap_activate.


Example:

var status = iap_status();
var iap_list = ds_list_create();
if status == iap_status_available
   {
   iap_enumerate_products(iap_list);
   }

The above code checks the status of the target IAP store, and if it is available it will populate the created list with the available product IDs for future use.


Back: In App Purchases
Next: iap_restore_all
© Copyright YoYo Games Ltd. 2018 All Rights Reserved