iap_files_purchased

Returns all information about any products that have been purchased.

Syntax:

iap_files_purchased();


Returns: Real


Description

WARNING! This function has been deprecated.

This function returns all the information about any products that have been purchased for the game on the device in the form of a ds_map. The key for each entry in the map is the product id and its value is a ds_list which itself contains a set of strings indicating the files that were extracted for the purchase.

NOTE: The ds_map returned is created by this function and maintained by GameMaker: Studio for all further calls. This means that you should not remove it from memory.


Example:

p_details = iap_files_purchased();
p_list = ds_map_find_value(p_details, "com.MacSweeney Games.CatchTheClown");
var i;
for (i = 0; i < ds_list_size(p_list); i += 1)
   {
   f_name = ds_list_find_value(p_list, i);
   draw_text(32, 32 + (i * 32), f_name);
   }
ds_map_destroy(p_details);

The above code gets the purchase details for the game with the given product index and then draws them one by one down the side of the screen.


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