<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKChallengeDefinition/loadImage(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKChallengeDefinition(im)loadImageWithCompletionHandler:"
  },
  "title" : "loadImage(completionHandler:)"
}
-->

# loadImage(completionHandler:)

Loads the image set on the challenge definition, which may be `nil` if none was set.

iOS, iPadOS, Mac Catalyst, tvOS, visionOS:

```
func loadImage(completionHandler: @escaping @Sendable (UIImage?, (any Error)?) -> Void)
```

```
var image: UIImage? { get async throws }
```

macOS:

```
func loadImage(completionHandler: @escaping @Sendable (NSImage?, (any Error)?) -> Void)
```

```
var image: NSImage? { get async throws }
```

---

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)