When to compile i386 on iOS

I recently moved to a new company and I am trying to deal with the Xcode settings in a project. The project is currently compiling for "armv7 armv7s arm64 armv8 i386". Can someone explain if it is necessary to compile for i386 and why?

My project compiles if I delete it. It should be noted that I am linking to C ++ lib, which is compiled with the same architectures. Is i386 used for simulator or any specific iOS devices?

thanks

+6
source share
2 answers

The i386 version is needed to run your application in the iOS simulator, which runs initially on OS X and uses the basic x86 / x64 hardware. This is much faster than ARM emulation.

+8
source

You do not need to specifically specify i386 in the configuration of the architecture. Ideally, you should just leave ARCHS and VALID_ARCHS as default values, and everything should just work. You will only see the listed architecture of the hands, but the right thing happens behind the scenes when creating for the sim.

When creating the simulator, your project will be built for i386, x86_64, or both (depending on the deployment purpose and the ARCHS and ONLY_ACTIVE_ARCH settings). In the simulator, 32-bit devices are allowed to run i386 code, and 64-bit devices can run both i386 and x86_64b code (like real devices, but using Intel instead of a hand).

0
source

Source: https://habr.com/ru/post/988715/


All Articles