My iOS App Got 22% Smaller With One Xcode Setting
Описание и применение
Включение mergeable libraries в Xcode 15 уменьшило размер релизной сборки iOS‑приложения на 22 % и избавило от загрузки динамических фреймворков при запуске, без изменений кода.
Задача
Modularizing the app increased its size and launch time; moving code into frameworks made the release build larger.
Результат
Enabling mergeable libraries reduced the app’s release size by 22 % and eliminated dynamic framework loading at launch, without any code changes.
Рабочий процесс
- 1. Modularize the app by moving code into dynamic frameworks.
- 2. Build the release archive and observe increased size and launch overhead.
- 3. Enable mergeable libraries by setting MERGED_BINARY_TYPE=automatic in the app target’s Build Settings.
- 4. Rebuild the release archive and verify the size reduction and zero framework loads.
Доказательства
Modularizing made our app bigger and slower to launch. One build setting won it all back, with zero code changes.
The app executable grew because all the code moved into it. The framework binaries left behind are empty shells.
Select your app target → Build Settings → search for Create Merged Binary → set it to Automatic.
- Дата записи: 2026-10-24T23:26:16.674Z