I have recently moved to a new company and am trying to get to grips with the Xcode settings on a project. Currently the project is being compiled for "armv7 armv7s arm64 armv8 i386". Could someone please explain if is necessary to compile for i386 and why?
My project compiles ok if i remove it. One thing to note is that I am linking to a c++ lib which is compiled with the same architectures. Is i386 used for the simulator or any specific iOS devices?
Thanks
You shouldn't need to specifically specify i386 in your architectures build setting. Ideally, you should just leave ARCHS and VALID_ARCHS as default values and everything should "just work". You will only see the arm architectures listed, but the right thing happens behind the scenes when building for the sim.
When building for the simulator, your project will be built for i386, x86_64, or both (depending on the deployment target and the ARCHS and ONLY_ACTIVE_ARCH build settings). In the simulator, 32bit devices are only allowed to run i386 code, and 64bit devices are able to run both i386 and x86_64b code (just like real devices but using intel instead of arm).