<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/StoreView/init(products:icon:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "StoreKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:17_StoreKit_SwiftUI0A4ViewV8products4iconACyx0cD005EmptyE0VGqd___x0aB07ProductV_AA0I9IconPhaseOtctcAHRs_SlRd__AL7ElementRtd__lufc"
  },
  "title" : "init(products:icon:)"
}
-->

# init(products:icon:)

Creates a view to merchandise a collection of products with promotional images.

```
nonisolated init(products: some Collection<Product>, @ViewBuilder icon: @escaping (Product, ProductIconPhase) -> Icon) where PlaceholderIcon == EmptyView
```

## Parameters

`products`

The products to merchandise.

`icon`

A closure that receives a [`Product`](/documentation/StoreKit/Product) and a [`ProductIconPhase`](/documentation/StoreKit/ProductIconPhase) as input. The [`ProductIconPhase`](/documentation/StoreKit/ProductIconPhase) indicates the state of the loading operation of the product’s promotional image. The closure returns the view to display for the given product and phase value.

## Discussion

The store view asynchronously loads and displays each product’s promotional image. Use the [`ProductIconPhase`](/documentation/StoreKit/ProductIconPhase) to monitor the current loading phase of the product’s promotional image, and provide an image for each phase. For more information about the loading phases, see [`ProductIconPhase`](/documentation/StoreKit/ProductIconPhase).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)