I think I remember someone telling me in some countries Apple's terms of service may not be enforceable on this, but I don't know if that's true or not. So yeah.the answer is this.technically you can run macOS on non-Apple hardware but you are violating Apple's terms of service. If Apple chooses to enforce its rules, they may kick you out of the dev program and you will have wasted your time. Maybe they will notice that you are not on Mac and turn a blind eye, but then again, maybe they won't. Maybe you'll get away with it by running macOS on a virtual machine, maybe you won't. If you plan on developing for the platform officially (submitting apps to the App Stores) I recommend you invest in a Mac. If you do, you basically are going rogue. You can't officially run macOS (and by extension Xcode) on non-Apple hardware. It is unless you are running it in a virtual machine on a Mac (which is not a solution for the poster).