Product.PromotionInfo
Information about a promoted In-App Purchase that customizes its order and visibility on the device.
Declaration
struct PromotionInfoMentioned in
Overview
The Product.PromotionInfo structure represents promoted in-app purchases available in your app. You set up promoted in-app purchases using App Store Connect, including their default display order and visibility settings. Use this API to override and customize their order and visibility. Overrides are per device. They can take effect after the user launches the app at least once.
You don’t instantiate this structure. To get a list of Product.PromotionInfo objects, call the static method updateProductOrder(byID:) with a list of product identifiers that represent your promoted in-app purchases. Then call currentOrder to get the list of Product.PromotionInfo objects. To change their order, call updateAll(_:) with the promoted in-app purchases listed in the desired order. To change the order using product identifiers, call updateProductOrder(byID:).
To prevent a promoted in-app purchase from appearing in the App Store on the device, there are two options:
Hide the product by setting the visibility value to Product.PromotionInfo.Visibility.hidden and calling update(), or call updateProductVisibility(_:for:).
Remove the product from the list by excluding it when you call updateAll(_:) or updateProductOrder(byID:).
To cancel your overrides and return to the default order and visibility, call updateAll(_:) or updateProductOrder(byID:) with an empty array.
For more information about promoting in-app purchases, see Supporting promoted In-App Purchases in your app.