Contents

updateAll(_:)

Sets the order and visibility of all the promoted products and saves your changes.

Declaration

static func updateAll(_ promotions: some Collection<Product.PromotionInfo>) async throws

Parameters

  • promotions:

    A collection of Promotioninfo objects that you list in the order they are to appear in the App Store on the user’s device. Use an empty collection to cancel previous changes.

Mentioned in

Discussion

Call this static method to set the order of promoted in-app purchases for the user. Calling this method overrides any previous order and visibility that you set for this user.

To remove a promoted in-app purchase so it doesn’t display for a user, there are two options:

To set the order of promoted in-app purchases using product identifiers instead of Product.PromotionInfo objects, see updateProductOrder(byID:).

Cancel overrides

To cancel the order and visibility changes you make, send an empty collection in promotions. All in-app purchases then display in the default order.

See Also

Updating order and visibility