What is embedded bitcode and what does ENABLE_BITCODE do in xcode?

Bitcode – Bitcode is an intermediate reperesentation of how the code looks. This code can not be used by us or can’t be installed on a device. When we upload our application to the app store It is uploaded as an bitcode and later converted to app binary by itunes/Apple.

When the Intermediate code is created an uploaded to the App store or run on the device, a program called LLMV takes over the control and converts the Intermediate code to a Binary file which is x86 32Bit or x86 64 bit for the simulator and ARM for the actual iOS handheld devices.

Enable_bitcode can be done from the build settings in our project. When we enable the Bitcode compilation the IR is not converted to binary directly. Hence it can not be run anywhere. This code is directly uploaded to app store and there it is converted to different binaries for different iOS versions and different iOS devices.