-
Notifications
You must be signed in to change notification settings - Fork 2
promotions
This is the Apple IAP Promotions module, which allows you to promote in-app purchases.
Apple IAP Object: https://developer.apple.com/documentation/storekit/skproductstorepromotioncontroller?language=objc
For more information on promoting in-app purchases, see:
These are the module's functions:
- iap_Promotion_Order_Fetch
- iap_Promotion_Order_Update
- iap_Promotion_Visibility_Fetch
- iap_Promotion_Visibility_Update
These are the module's constants:
Apple IAP Function: fetchStorePromotionOrderWithCompletionHandler
This function reads the product order override that determines the promoted product order on this device.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the In-App Purchase Async Event.
Syntax:
iap_Promotion_Order_Fetch()
Returns:
N/A
Triggers:
Key | Type | Description |
---|---|---|
id | iap_promotion_event_id | The constant value iap_promotion_order_fetch . |
success | Boolean | Whether the fetch succeeded or not. |
products | String | A JSON string containing information on the products. |
Apple IAP Function: updateStorePromotionOrder:completionHandler:
This function overrides the promoted product order on this device.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the In-App Purchase Async Event.
Syntax:
iap_Promotion_Order_Update(products)
Argument | Type | Description |
---|---|---|
products | String | A JSON-encoded string of an array of IAP identifiers. |
Returns:
N/A
Triggers:
Key | Type | Description |
---|---|---|
id | iap_promotion_event_id | The constant value iap_promotion_order_update . |
success | Boolean | Whether the update was successful or not. |
Apple IAP Function: fetchStorePromotionVisibilityForProduct:completionHandler:
This function reads the visibility setting of a promoted product in the App Store for this device.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the In-App Purchase Async Event.
Syntax:
iap_Promotion_Visibility_Fetch(product)
Argument | Type | Description |
---|---|---|
product | String | The product identifier for which to get the visibility. |
Returns:
N/A
Triggers:
Key | Type | Description |
---|---|---|
id | iap_promotion_event_id | The constant value iap_promotion_visibility_fetch . |
product | String | The product identifier. |
success | Boolean | Whether the fetch was successful or not. |
visibility | iap_promotion_visibility | The visibility of the product. |
Apple IAP Function: updateStorePromotionVisibility:forProduct:completionHandler:
This function updates the visibility of the product on the App Store, per device.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the In-App Purchase Async Event.
Syntax:
iap_Promotion_Visibility_Update(product, visibility)
Argument | Type | Description |
---|---|---|
product | iap_promotion_event_id | The IAP identifier of the product. |
visibility | iap_promotion_visibility | The visibility of the product. |
Returns:
N/A
Triggers:
Key | Type | Description |
---|---|---|
id | iap_promotion_event_id | The constant value iap_promotion_visibility_update . |
success | Boolean | Whether the fetch was successful or not. |
This constant represents an async event ID (or type) related to IAP promotions.
These constants are referenced by the following functions:
- iap_Promotion_Order_Fetch
- iap_Promotion_Order_Update
- iap_Promotion_Visibility_Fetch
- iap_Promotion_Visibility_Update
Member | Description |
---|---|
iap_promotion_purchase |
This event ID indicates a response to a promotion purchase. |
iap_promotion_order_fetch |
This event ID indicates a response to an order fetch. |
iap_promotion_order_update |
This event ID indicates a response to an order update. |
iap_promotion_visibility_fetch |
This event ID indicates a response to a fetch of visibility settings. |
iap_promotion_visibility_update |
This event ID indicates a response to an update of visibility settings. |
This constant represents the possibilities for promotion visibility.
These constants are referenced by the following functions:
Member | Description |
---|---|
iap_promotion_visibility_default |
Use the default promotion visibility. |
iap_promotion_visibility_show |
Show promotions. |
iap_promotion_visibility_hide |
Hide promotions. |
YoYoGames 2024