Contents

init(id:prefersPromotionalIcon:)

Creates a view to load and merchandise an individual product from the App Store.

Declaration

nonisolated init(id productID: Product.ID, prefersPromotionalIcon: Bool = false) where Icon == EmptyView, PlaceholderIcon == EmptyView

Parameters

  • productID:

    The product identifier to load from the App Store.

  • prefersPromotionalIcon:

    A Boolean value that indicates whether to use the promotional image from the App Store, if it’s available. If this parameter is false, the system ignores any promotional images.

Discussion

By default, the view doesn’t show an icon. If you set the prefersPromotionalIcon parameter to true, the view displays a placeholder icon while loading, and replaces the placeholder with the promotional image for the product.

See Also

Creating product views that load products