UTM icon indicating copy to clipboard operation
UTM copied to clipboard

Update availability check for MenuLabel to support macOS 11.0 or later

Open iCMDdev opened this issue 2 months ago • 8 comments

This PR updates an availability check for a SwiftUI .titleAndIcon label, which allows decreasing the minimum deployment to macOS 11.0.

This allows UTM 4.x to build & run on earlier versions of macOS Big Sur (11.x < 11.3).

iCMDdev avatar Oct 04 '25 21:10 iCMDdev

Note that I haven't changed the minimum deployment-related Xcode files in this PR, yet.

iCMDdev avatar Oct 04 '25 21:10 iCMDdev

Now it should be done.

iCMDdev avatar Oct 04 '25 21:10 iCMDdev

Have you tried building and testing it?

osy avatar Oct 04 '25 22:10 osy

I followed the instructions here (downloaded sysroot-macOS-arm64 from GitHub Actions) and succesfully built from Xcode 26 (on macOS 26). I didn't get any build errors, but I haven't tested the resulted app on macOS 11.x < 11.3.

Earlier (before making this change), I had access to a Mac on 11.2.3, and I manually changed the minimum version of the official (latest) binary using vtool, which resulted in an Undefined symbol crash (in SwiftUI if I recall correctly). I think that was likely caused by the .titleAndIcon label style, which is unavailable on macOS versions < 11.3.

Xcode indeed throws this error if I change the minimum deployment on the currrent main branch (unmodified) code:

Xcode error

iCMDdev avatar Oct 05 '25 07:10 iCMDdev

Visually, I haven't seen anything else that requires macOS 11.3 or later, other than this, but I could be wrong - though building seems fine.

iCMDdev avatar Oct 05 '25 07:10 iCMDdev

If I remember correctly, there was a number of SwiftUI bugs that was fixed in 11.3. I don't recall the full list off the bat, but I would try testing VM creation, config (all the tabs, changing all the options), app preferences, and moving around VMs on the home screen.

osy avatar Oct 05 '25 07:10 osy

I'll test and see. Either way, if you consider it's better to keep 11.3 as a minimum target, I think it's fine (and people can / should upgrade either way).

iCMDdev avatar Oct 05 '25 07:10 iCMDdev

Sorry for the delay; unfortunately, my Mac doesn’t support a version that low, so I haven’t been able to test this yet. If anyone is willing to test it, I’d appreciate it. However, as I mentioned earlier, I don’t believe this is an urgent matter, as people should upgrade to later versions regardless.

iCMDdev avatar Oct 26 '25 17:10 iCMDdev