Button SDK & ButtonJS Performance Primer on

Button SDK & ButtonJS Performance Primer

The Button SDK is a small iOS library that provides the tools to power your mobile partnerships. Once compiled into your app binary, the SDK has a < 1MB footprint depending on your project settings.

What are the goals of the Button SDK?

The Button SDK aims to be small, fast, and safe. Small refers to the footprint of the library being served in terms of file size, fast refers to latency in every phase, and safe refers to our diligence to fail gracefully in error conditions.

What is the size of the Button SDK?

The compiled static library has slices for all supported device architectures and the iOS simulator. The actual size of the SDK, once compiled into the partner app, will depend on:

  • Project settings and what optimizations are set up for compiling releases.
  • Whether or not Bitcode is enabled.

Bitcode allows for Apple to optimize the app download size, including a binary specific for each device. If the partner does not enable bitcode, these extra symbols will be stripped and it would effectively be smaller.

The specific Button.bundle with the UI components is ~160KB.