Most if not all smart phones uses an ARM processor. However, I believe that mobile apps are developed on Desktops, laptops which all run x86. So for example, how does an ios app or an Android App, which run on ARM based processor, work when it written on x86 based Mac work?
2 Answers
On iOS, the simulator runs x86/x86-64 builds of the code to be tested (exclusively 64-bit builds these days).
It's worth pointing out some significant architectural differences in approach between Android and iOS when it comes to simulators. The iOS Darwin kernel is ABI and API compatible with that in MacOS, and the simulator app simply runs the iOS 'shell' including springboard, and a full set of user-space libraries on top of the host operating system.
Android simulators are run in virtual machines, optionally with instruction set emulation.
There are types of development where neither approach is idea. Any code relying on low-level optimisations needs to be tested on a device.

- 9,029
- 4
- 30
- 46
Emulators.
And/or x86 Android in a VM, because most Android programs are portable at a source level between x86 Android and ARM / AArch64 Android. (But that's still just a more-efficient emulation, not running Android applications directly under the x86 Linux kernel on your desktop).
I assume it's also pretty easy to compile on a desktop and run on a real phone if you set up your networking correctly, possibly after jailbreaking the phone to let it run apps without having to reinstall through the app store. IDK the details.

- 328,167
- 45
- 605
- 847
-
-
1
-
I have been searching for x86, ARM, android and emulators. Do you have an specific references like links, that would be really helpful? – Sam Aug 07 '19 at 04:08
-
1@Sam The android SDK ships with AVDs (Android Virtual Devices) that are basically x86 builds of the Android OS and that support ADB via a local socket so that you can install and run application on it. It's not always fast. Xcode ships with a (very fast) iOS emulator that allow you running iOS apps on a Mac (Apple development is done on Macs officially). Using a bare ARM simulator would be painful for Android and impossible for iOS (since it is not redistributable). Windows App are simply compiled for x86 and when done developing recompiled for ARM. – Margaret Bloom Aug 07 '19 at 07:28