<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZMacOSRestoreImage/fetchLatestSupported(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "s:So19VZMacOSRestoreImageC14VirtualizationE20fetchLatestSupported17completionHandleryys6ResultOyABs5Error_pGc_tFZ"
  },
  "title" : "fetchLatestSupported(completionHandler:)"
}
-->

# fetchLatestSupported(completionHandler:)

Fetches the latest restore image supported by this host from the network.

```
@preconcurrency class func fetchLatestSupported(completionHandler: @escaping @Sendable (Result<VZMacOSRestoreImage, any Error>) -> Void)
```

## Parameters

`completionHandler`

A block called after the restore image fetch has succeeded or failed. The `error` parameter passed to the block is `nil` if the image restoration was successful.

    The system invokes the completion handler on an arbitrary thread. The completion handler returns an     `error`     parameter that describes the reason for the failure; the block is     `nil`     if installation was successful.

## Discussion

Construct a [`VZMacOSInstaller`](/documentation/Virtualization/VZMacOSInstaller) object with a `VZMacOSRestoreImage` loaded from a file on the local file system. A `VZMacOSRestoreImage` fetched with the [`latestSupported`](/documentation/Virtualization/VZMacOSRestoreImage/latestSupported) method has a URL property that refers to a restore image on the network.

To use a network restore image, download the file to disk (using <doc://com.apple.documentation/documentation/Foundation/URLSession> or similar API). After downloading the restore image, you can initialize a [`VZMacOSInstaller`](/documentation/Virtualization/VZMacOSInstaller) using a URL referring to the local file.

---

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)