How is iOS and macOS the same thing? It's not even running on the same architecture.
He means running xcode to produce iOS binaries
Then that's different.
This won't work, xcode is heavily integrated with macOS only libraries and as far as I'm aware, it requires GUI interaction at some point to produce the iOS binary.