I have a working XIB App to run a Linux VM with graphics interface. I am trying to rewrite it in SwiftUI but fall into all sorts of problems when using a combination of a Representable of the VZVirtualMachineView, an associated Coordinator, and @StateObjects.
a) The VM display is not updated when running but is displayed if I close the window and reopen it. As the underlying VZVirtualMachineView is created/dismantled many times, there are warnings about negative scanouts that end up crashing the App
b) Keyboard focus is not really working.
https://developer.apple.com/forums/thread/766014 reports that there is probably a solution making a NSViewControllerReporesentable rather than a VZVirtualMachineViewRepresentable.
I think I am fighting against proper SwiftUI lifecycle and would love to have a hint at what shall be the right organization of model and SwiftUI constructs.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have a Hypervisor Framework App that works on MacOS 14 and 15 but fails on MacOS 26.
To reproduce:
hv_vm_config_t vm_config = hv_vm_config_create();
result = hv_vm_create(vm_config);
result == HV_DENIED /* (0xfae94007) */
(from per the header file - not present on the online documentation)
com.apple.security.hypervisor is set, no other VMs are running (no Virtualization Framework and no Hypervisor Framework).
I have tried various entitlements with no success. Sandbox is off.