iap_product_status

Indicates whether or not a product has been purchased.

Syntax:

GML Code Example

iap_product_status(product_id);


Argument Description
product_id The Apple Store/Google Play product id for the purchase in reverse URL format, eg: "com.MacSweeney Games.CTC.LevelPack".


Returns: String


Description

WARNING! This function has been deprecated.

This function is similar to the iap_status function, but instead of a ds_map with detailed information, this function returns a string with the current status of the purchase specified by the purchase id. The following text can be returned by this function:

  • "Purchased"
  • "Available"
  • "Unavailable"


Example:

GML Code Example

if iap_product_status(p_id) == "Purchased"
    {
    var list, i;
    list = ds_list_create();
    iap_product_files(p_id, list);
    for (i = 0; i < ds_list_size(list); i += 1)
       {
       draw_text(x, y + (i * 32), ds_list_find_value(list, i));
       }
    ds_list_destroy(list);
    }
 

The above code checks the previously stored product id to see if it has been purchased, and if it has it then creates and displays a list of product files that have been downloaded.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here