The hardware is mostly irrelevant for these two OS's. You could install both on any PC. A copy of Windows Pro is $199 (or less if you buy a PC off the shelf).
Apple chains their OS to their computers. There's no reason MacOS can't run on regular PC hardware, aside from the fact they don't want you to. The cheapest, i3 based (which is shit, obviously), 128GB hard drive Mac computer is $799.
Finally, to compare apples to apples: Android Studio runs on Windows, Mac, and Linux. XCode could do the same. Even if it was for iOS only. Which, most people would be targeting anyways.
Apple chains their OS to their computers. There's no reason MacOS can't run on regular PC hardware, aside from the fact they don't want you to. The cheapest, i3 based (which is shit, obviously), 128GB hard drive Mac computer is $799.
Finally, to compare apples to apples: Android Studio runs on Windows, Mac, and Linux. XCode could do the same. Even if it was for iOS only. Which, most people would be targeting anyways.