Add a Bluetooth keyboard and you can code just fine on iOS. The problem is that there are no native tools for it (that we have access to).
That’s actually a very minor hurdle, not a long way at all.
An Xcode for iOS would be designed to make it straightforward to develop iOS apps and then sign them and upload them to the App Store when you're ready.
You can't run unsigned code on iOS (with a few exceptions), and I don't believe that anyone has come up with a viable solution to codesign code on the fly on-device.
The reason the Android emulator is slow is that it is actually emulating an ARM CPU.
The iOS simulator, on the other hand, is running an iOS natively built for x86, and Xcode targets the x86 architecture when you build your app for the simulator.
Couldn’t something similar be done with Android on Linux, running x86 Android and using the host system’s kernel?
Uh, no. The simulator literally boots an entire copy of iOS, with its own libraries, frameworks, and utilities, that's entirely separate from the host OS.
You can actually see your running iOS applications, and all of the iOS daemons etc show up as first class processes on you Mac if you run "ps".
iOS apps running in the simulator are not separate from the host OS at all - they're running on the host OS, just like any other process. Try killing "Springboard" from your Mac command line and watch what happens inside the simulator...
The default x86 is a fair bit faster than my phone....
I'd expect double-down on that in fact.