Hi,
I don't have a solution to your problem, but I can tell you why it fails.
According to the xcodebuild man page, when platform is set to macOS, the only other keys that can be included in your destination specifier are arch and variant.
Sorry I can't help any further.
H.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: