<!--
{
  "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/ProductView/init(_:icon:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "StoreKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:17_StoreKit_SwiftUI11ProductViewV_4iconACyx0cD005EmptyF0VG0aB00E0V_xAA0E9IconPhaseOctcAGRs_rlufc"
  },
  "title" : "init(_:icon:)"
}
-->

# init(_:icon:)

Creates a view to display a product that the system already loaded from the App Store, and merchandise it using its promotional image.

```
nonisolated init(_ product: Product, @ViewBuilder icon: @escaping (ProductIconPhase) -> Icon) where PlaceholderIcon == EmptyView
```

## Parameters

`product`

The product to merchandise.

`icon`

A closure that receives a [`ProductIconPhase`](/documentation/StoreKit/ProductIconPhase) as an input, which indicates the state of the loading operation of the product’s promoted image, and returns the view to display for the specified phase.

## Discussion

The product view asynchronously loads and displays the product’s promotional image.

The [`ProductIconPhase`](/documentation/StoreKit/ProductIconPhase) value indicates whether the promotional image is loading, unavailable, or whether it succeeded or failed to load. Use the [`ProductIconPhase`](/documentation/StoreKit/ProductIconPhase) to monitor current loading phase, and to decide the image to return in the `icon` closure.

---

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)