Skip to content

Bundle Size

As you add more features to your app, your app bundle size keeps growing. While some of the bundle size growth is inevitable as you ship more code and assets, there are many ways to minimze that growth, such as by ensuring your assets are not duplicated across your bundles or stripping unused binary symbols. Tuist provides you with tools and insights to help your app size stay small – and we also monitor your app size over time.

Usage

To analyze a bundle, you can use the tuist inspect bundle command:

bash
tuist inspect bundle App.ipa
bash
tuist inspect bundle App.xcarchive
bash
tuist inspect bundle App.app

The tuist inspect bundle command analyzes the bundle and provides you with a link to see a detailed overview of the bundle including a scan of the contents of the bundle or a module breakdown:

Analyzed bundle

Continuous integration

To track bundle size over time, you will need to analyze the bundle on the CI. First, you will need to ensure that your CI is authenticated:

An example workflow for GitHub Actions could then look like this:

yaml
name: Build

jobs:
  build:
    steps:
      - # Build your app
      - name: Analyze bundle
        run: tuist inspect bundle App.ipa
        env:
          TUIST_CONFIG_TOKEN: ${{ secrets.TUIST_CONFIG_TOKEN }}

Once set up, you will be able to see how your bundle size evolves over time:

Bundle size graph

Released under the MIT License.