---
title: ProductIconPhase
framework: storekit
role: symbol
role_heading: Enumeration
path: storekit/producticonphase
---

# ProductIconPhase

The current phase of the asynchronous loading operation of a product’s promotional image.

## Declaration

```swift
enum ProductIconPhase
```

## Overview

Overview When you create a ProductIconPhase instance with an initializer such as init(ids:icon:placeholderIcon:), you define the appearance of the view’s icon, or image, using a content closure. SwiftUI calls the closure at different stages of the promotional image’s load operation with a phase value that indicates the current state. Use the phase to decide what to draw. For example, you can draw a placeholder image during the loading phase, a view that indicates an error, a default image, or the loaded promotional image if it exists: StoreView(products: [      product1,      product2,      // Additional products, as needed.  ]) { product, phase in      switch phase {      case .loading: MyPlaceholder()      case .failure(let error): MyErrorView(error)      case .unavailable: MyDefaultIcon()      case .success(let promotedIcon): promotedIcon      }  } You set up promotional images for in-app purchases in App Store Connect. For more information, see Promote in-app purchases.

## Topics

### Getting the promotional image’s load phases

- [ProductIconPhase.loading](storekit/producticonphase/loading.md)
- [ProductIconPhase.success(_:)](storekit/producticonphase/success(_:).md)
- [ProductIconPhase.unavailable](storekit/producticonphase/unavailable.md)
- [ProductIconPhase.failure(_:)](storekit/producticonphase/failure(_:).md)

### Getting the promotional image

- [promotionalIcon](storekit/producticonphase/promotionalicon.md)

### Getting the error

- [error](storekit/producticonphase/error.md)
