25

When exporting an archive of a project containing Swift, we get the option to "strip Swift symbols". I haven't seen any difference in app size though in a project with just one dummy Swift file, thus a perfect case for maximum stripping.

What does this do exactly and how does it affect the final app size (.ipa)?

enter image description here

P.S: as seen in Xcode 9 beta 6

UPDATE: actually I can observe a slight ipa size reduction (3.4 MB uncompressed) when looking at specific devices variants (not for universal variant though)

mfaani
  • 33,269
  • 19
  • 164
  • 293
atineoSE
  • 3,597
  • 4
  • 27
  • 31
  • 6
    The only thing I can think of in this context is **reverse engineering**. But to make you sure, you still will be able to see readable crashes. I can confirm that builds still include debug symbols *(dSYM)* with *Strip Swift symbols* flag `enabled`. – Jakub Truhlář Nov 03 '17 at 11:11

1 Answers1

14

According to the Xcode docs:

The new Strip Swift Symbols (STRIP_SWIFT_SYMBOLS) build setting is enabled by default. It adjusts the level of symbol stripping so that when the linked product of the build is stripped, all Swift symbols are removed. This significantly reduces the size of Swift frameworks. If the lack of Swift symbols causes problems, such as when using dladdr(), this setting can be disabled. To view the exported symbols from file that has been stripped, use xcrun dyldinfo -export instead of nm. (31306055)

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
Manuel
  • 14,274
  • 6
  • 57
  • 130