---
title: "init(products:icon:)"
framework: storekit
role: symbol
role_heading: Initializer
path: "storekit/storeview/init(products:icon:)"
---

# init(products:icon:)

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

## Declaration

```swift
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 doc://com.apple.storekit/documentation/StoreKit/Product and a doc://com.apple.storekit/documentation/StoreKit/ProductIconPhase as input. The doc://com.apple.storekit/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

Discussion The store view asynchronously loads and displays each product’s promotional image. Use the 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.

## See Also

### Creating store views with preloaded products

- [init(products:prefersPromotionalIcon:)](storekit/storeview/init(products:preferspromotionalicon:).md)
- [init(products:prefersPromotionalIcon:icon:)](storekit/storeview/init(products:preferspromotionalicon:icon:).md)
