Update availability check for MenuLabel to support macOS 11.0 or later
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).
Note that I haven't changed the minimum deployment-related Xcode files in this PR, yet.
Now it should be done.
Have you tried building and testing it?
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:
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.
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.
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).
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.