<!--
{
  "availability" : [
    "iOS: 16.4.0 -",
    "iPadOS: 16.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/Product/PromotionInfo/updateProductVisibility(_:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit7ProductV13PromotionInfoV06updateC10Visibility_3foryAE0G0O_SStYaKFZ"
  },
  "title" : "updateProductVisibility(_:for:)"
}
-->

# updateProductVisibility(_:for:)

Updates a value that indicates whether a promoted Apple In-App Purchase appears in the App Store on the user’s device.

```
static func updateProductVisibility(_ visibility: Product.PromotionInfo.Visibility, for productID: Product.ID) async throws
```

## Parameters

`visibility`

A visibility value of [`Product.PromotionInfo.Visibility`](/documentation/StoreKit/Product/PromotionInfo/Visibility-swift.enum) that determines whether a promoted Apple In-App Purchase appears in the App Store on the user’s device.

`productID`

The product identifier of the promoted Apple In-App Purchase.

## Discussion

Call this method to change the visibility setting for a promoted Apple In-App Purchase. Changes take effect after you call this method.

The following code example updates a promoted product’s visibility after the user purchases it. The purchased product is hidden to avoid showing it again on the device.

```swift
// Update visibility to hide a promoted product after the user purchases it.
let purchasedProductIdentifier = "com.example.ExampleApp.product1"

do {
  try await Product.PromotionInfo.updateProductVisibility(.hidden, for: purchasedProductIdentifier)
}
catch {
  <#Handle Error#>
}
```

---

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)