You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/apple/guides/ios/size-analysis/insights.mdx
+57-19Lines changed: 57 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,6 @@ sidebar_order: 5250
4
4
description: See how Size Analysis surfaces trends for your iOS builds.
5
5
---
6
6
7
-
TODO: ADD SOME PICS
8
-
9
7
Size Analysis Insights point out how opportunities to reduce your iOS app's size. They spot patterns like duplicate files, oversized media, or unneeded assets, and list exactly what to fix along with the estimated size savings.
10
8
11
9
## iOS Insights
@@ -40,7 +38,7 @@ Below are a list of available insights for iOS builds, followed by more details
40
38
has them) before stripping.
41
39
</Alert>
42
40
43
-
In Xcode, ensure your release configuration sets the `Debug Information Format` build setting to `DWARF with dSYM`.
41
+
In Xcode ensure your release configuration sets the `Debug Information Format` build setting to `DWARF with dSYM`.
44
42
45
43
The `strip` command can then remove the extra information:
46
44
@@ -60,21 +58,61 @@ To automate stripping in your project after building, add a Run Script phase tha
60
58
#!/bin/bash
61
59
set -e
62
60
63
-
if [ "Release"!="${CONFIGURATION}" ];then
64
-
echo"Skipping symbol stripping for ${CONFIGURATION} build."
Because Xcode generates dSYMs from the unstripped binary, list the dSYM as an Input File so the script runs after Xcode finishes generating it:
@@ -192,7 +230,7 @@ optimize_icon() {
192
230
193
231
### Loose Images
194
232
195
-
**What it is**: Finds scaled @1x/@2x/@3x images stored outside of asset catalogs. App thinning will not remove these images, even when they are not needed for the user's device.
233
+
**What it is**: Finds scaled @1x/@2x/@3x images stored outside of asset catalogs. This prevents app thinning from removing variants not needed for the user's device.
196
234
197
235
**How to fix**: Move each image set into an asset catalog in Xcode.
198
236
@@ -226,11 +264,11 @@ optimize_icon() {
226
264
227
265
**How to fix**: Start with low-effort cleanup, then automate comment stripping if you still ship large payloads.
228
266
229
-
#### Option 1: Keep the Format Lean
267
+
#### Option 1: Keep the format lean
230
268
231
269
- Encode localized strings as plain text (`"key" = "value";`), not binary plists. Set **Strings File Output Encoding** (`STRINGS_FILE_OUTPUT_ENCODING`) to **UTF-8** in Xcode.
232
270
233
-
#### Option 2: Strip Comments Automatically
271
+
#### Option 2: Strip comments automatically
234
272
235
273
String files can have comments that ship with the bundle. They help during translation but take space in production. A typical comment may look like:
0 commit comments