Game World!

Join A World Of Gamers

Enter your email address:

Delivered by FeedBurner

Followers

Popular Posts

Monday 28 June 2021

What does bit code mean?

 Many developers have seen that there is an option called Bitcode enable but only a few developers have the knowledge of it. So I am trying to give an idea about this here.

Before going to Bitcode we need to understand what is App Thinning?

App Thinning

From the title itself, we understand it’s related the reducing the size of the app.
Because everybody wants an optimized solution for every problem and when it comes to memory then obviously we are more concerned about it.

So basically App Thinning is the process of reducing the size.

App Thinning has three component
1)App Slicing
2)On-Demand Resources
3)Bitcode

  1. App Slicing
    As we are developing apps that can support all devices and every device has different compatibility and requirement. For example, We have assets of 1x,2x, and 3x. And that is not required by every device. It’s not good to download all assets if the device only needs 2x assets. So basically app slicing is downloading only required assets by the device.
  2. on-Demand Resources
    As a name given it only download the required resources. Like if while using the app we don’t need an entire library of resources currently as per the need. the on-Demand Resource is the process of download and deletes the resource as per the need.
  3. Bitcode
    Bitcode is the intermediate representation of your code/app while uploading it to AppStore.
    Let’s understand this, When you are compiling code means you are converting the human-readable source code to machine code i.e code which understands by machine let’s say in binary format. Before converting into a machine code compiler convert it into bitcode format so that compiler can re-optimize the code and resize it and then bitcode is converted into machine code.
    So basically bit code is the middle layer in between source code and machine code and that’s why it is called an intermediate representation of code/app.

What is the advantage of bitcode enable?

As we know Apple is always trying to improve or we can say enhance their performance of clang compiler and always make changes. So after each and every update, it’s very difficult for the developer to update your app and upload it to AppStore again so that it will support the new update. Here bitcode plays an important role from bitcode apple can recompile your code and which can easily support for newly enhanced clang compiler and no need to upload new source code or app to AppStore.

How does it work?

When you are enabling the bitcode that means you are attaching the copy of bitcode with machine code while uploading app to Appstore(We are actually only uploading the machine code to Appstore). So whenever apple enhances their clang compiler it takes a copy of bitcode from AppStore, compiles it, and replaces it with old machine code with a copy of bitcode.

Good question, When a device is downloading the app(machine code) it only downloads the machine code file and ignores the bitcode file.

Conclusion

Bitcode is file that can be available to iTunes connect and they can use it to recompile with the updated clang compiler.

Floating Button

Button