3 ms·
Similarities between iOS and macOS don't have much to do with it. The reason the Android emulator is slow is that it is actually emulating an ARM CPU. The iOS
by Reason077 8y ago
Similarities between iOS and macOS don't have much to do with it.
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.
- kitsunesoba 8y agoIt certainly doesn’t hurt that the simulator only needs to run the iOS front end on top of macOS Darwin instead of a full copy of iOS, though. Couldn’t something similar be done with Android on Linux, running x86 Android and using the host system’s kernel?
- monocasa 8y agoThere's a lot of Android specific kernel interfaces that'd have to be added to the desktop. Stuff like the binder IPC. It's doable, but work.
- saagarjha 8y ago> It certainly doesn’t hurt that the simulator only needs to run the iOS front end on top of macOS Darwin instead of a full copy of iOS, though. 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.
- Reason077 8y agoThat is incorrect. The iOS simulator is not a virtualized environment. It's not running it's own kernel etc, rather it's just a set of iOS libraries and frameworks built for x86 and a thin compatibility layer so that they run on macOS. 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...
- vbezhenar 8y agoDoes anyone really uses ARM emulation? I think, everyone just uses x86 Android image which should be the same as Apple's iOS Simulator. And if you need to test ARM, you should just use real phone.
- BenjiWiebe 8y agoI've used both. ARM emulation is slow, as you'd expect from a CPU emulation. The default, x86, is blazingly fast. Of course, this is assuming you remember to turn on virtualization features on your CPU. The default x86 is a fair bit faster than my phone....