Files
VirtualBuddy/VirtualInstallation/Source/Backend/VIWaitForDevice.h
Guilherme Rambo 71c570e31a Implement custom virtual machine restore mechanism (#688)
* Move ECID getter into VZMacMachineIdentifier

* Implement a custom macOS restore backend to work around macOS 27 issues on macOS 26 hosts

* Add virtual installation requirement set and enforce during VM restore

* Change requirement for macOS 27 Virtual Installation to min host macOS 26

* Add CI script that sets CURRENT_PROJECT_VERSION to the Xcode Cloud build number
2026-06-12 10:02:57 -03:00

21 lines
1.1 KiB
Objective-C

#pragma once
#import <Foundation/Foundation.h>
#import <VirtualInstallation/MobileDeviceSPI.h>
/// Waits for the specified device to be connected.
/// - Parameters:
/// - ecid: The ECID of the device to wait for.
/// - state: The state the device needs to be in. Specify `kAMRestorableDeviceStateUnknown` if you don't care about the state.
/// - timeoutInMilliseconds: The maximum amount of time in milliseconds to wait for the device.
///
/// This blocks the current queue and waits for a restorable device with the specified ECID and state to show up.
/// If state is set to `kAMRestorableDeviceStateUnknown`, this returns as soon as the device shows up, in any state.
///
/// Returns the device once found in the specified state.
/// If more than `timeoutInMilliseconds` elapses and the device is not found in the specified state, returns `nil`.
///
/// - note: Because this function blocks until the device is found or it times out, you should not call it from the main queue.
AMRestorableDeviceRef _Nullable VIWaitForDeviceWithECID(uint64_t ecid, AMRestorableDeviceState state, int timeoutInMilliseconds);