What is Bitcode in iOS

You may compile and build iOS app using Swift and/or Objective-C every day, and you’ve probably you heard of Bitcode multiple times. So what exactly is the Bitcode, as some of you might see the configuration in the build phrase (Target -> Build Settings -> Enable Bitcode):

Bitcode is intermediate language that between frontend (OC, Swift and C) and backend (X86, PowerPC, ARM machine language).

A complete compile includes three main steps:

  • Frontend: compile frontend source code into Bitcode.
  • Optimizer: optimize the Bitcode based on the configuration, make the code run more efficiently, and reduce the size of app.
  • Backend: as known as CodeGenerator, which convert the ooptimized `Bitcode` into target architecture machine language, such as x86, PowerPC, ARM and so on.

Back to the top question, when Enable Bitcode is set to YES, the optimized Bitcode generated in the Optimizer step will be added to the app, and submitted to App Store. When Apple receives our Bitcode, Bitcode will be recompiled on the server side and generates a more usable version based on each of the platforms, such as the iPhone X, iPhone 11, iPad Pro 2018 and so on in order to shrink the size of the app size and run more efficiently.

If you like this story, please 👏👏👏, I will continue to share more tutorials.

Originally published at https://needone.app on October 14, 2020.





Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Auto-Scrolling with ScrollViewReader in SwiftUI

SKOverlay in SwiftUI

Triangular geometric shapes.

Preview in SwiftUI

How to Change Screen Orientation on APPLE Watch Series 6 –

MVVM in SwiftUI with Sample, A Quick Look

Generating beautiful QR code views in iOS using Swift

Swift Keyboard Control for UITextFields and UITextViews

Swift Keyboard Control for TextFields and TextViews

SwiftUI: How to make filling wave animation

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Needone App

Needone App


More from Medium

Best way to use Font Name using enum in iOS-Swift

Bubble Sort in Swift

Resolve a question about pthread_rwlock_t

Every iOS developer should know these Xcode tricks