I wrote a screensaver in Swift.
Although I had set the macOS Deployment Target to macOS 10.13, it failed to run on an x86_64 Mid 2010 Mac Pro running macOS High Sierra 10.13.6.
Meanwhile, it runs fine on my arm64 2020 MBP M1 with macOS Big Sur 11.5.2, and on an x86_64 2019 MacBook Air with macOS Catalina 10.15.6.
The screensaver installs fine on all machines, but on the machine running High Sierra it says that the screensaver is not compatible.
The error message shown is as follows ("vibe" is the name of the screensaver that I made. So anyone else running across this same problem will see a similar message but with the name of their own screensaver in place of that of course):
You cannot use the vibe screen saver with this version of macOS.
Please contact the vendor to get a newer version of the screen saver.
I am wondering if there is a way to automatically figure out if there are any APIs or other features that my code is using which were not available in macOS 10.13. And also I am wondering if it is usual that you can build for a given macOS Deployment Target and then when you try to run the program on a machine that is within the range that should be supported, the program will not run after all. I had thought that there would be a build time error to build for a macOS Deployment Target if the built program will not run on it.
I am using Xcode 12.5.1 running on my MBP M1, macOS 11.5.2, and as mentioned I am building for macOS Deployment Target set to macOS 10.13. The screensaver runs fine on both Intel with macOS 10.15 and ARM with macOS 11.5. I am using Swift Language Version Swift 5.