<!--
{
  "availability" : [
    "iOS: 18.1.0 -",
    "iPadOS: 18.1.0 -",
    "macCatalyst: 18.1.0 -",
    "macOS: 15.1.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/EnvironmentValues/supportsImagePlayground",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17EnvironmentValuesV15ImagePlaygroundE08supportseF0Sbvp"
  },
  "title" : "supportsImagePlayground"
}
-->

# supportsImagePlayground

A Boolean value that indicates whether image generation
is available on the current device.

```
var supportsImagePlayground: Bool { get }
```

## Discussion

The value of this property is `true` when the current device
supports image generation. A device might not support this
feature if the device or system doesn’t meet the hardware
requirements or the necessary environment (for example runs
in a supported language) to generate the images.

Read this property from the environment to determine if your app can
use the `imagePlaygroundSheet`.

```
struct ImageGenerationPresentingView: View {
    @Environment(\.supportsImagePlayground) private var supportsImagePlayground
    @State private var showsImagePlaygroundSheet = false

    var body: some View {
        Button("Open Generation Sheet") {
            showsImagePlaygroundSheet = true
        }
        .disabled(!supportsImagePlayground)
    }
}
```

---

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)