Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Strip Debug Symbols During Copy" and "Strip Linked Product"

Tags:

xcode

xcode4

I read a lot of thing and discovery this configs have 2 side effect:

  • Make the binary size smaller
  • The program show a better debug crash

I am building program for iOS, so I want my binary to be the smallest possible. This mean:

  • If I set YES to both config, my binary will be the smaller
  • If I set NO, I will get better debug crash

So I have to set YES for AppStore version and NO for Debug?

like image 659
Rodrigo Avatar asked Feb 22 '12 17:02

Rodrigo


People also ask

What is the difference between copy_phase_strip and strip_installed_product?

Strip Debug Symbols During Copy ( COPY_PHASE_STRIP ): Made no difference, the sequence is unchanged Strip Linked Product ( STRIP_INSTALLED_PRODUCT ): Made no difference, the sequence is unchanged

When generatedsymfile is executed what happens to the debugging symbols?

When GenerateDSYMFile is executed, all that is left are the debugging symbols within the app. These symbols are then also stripped. BUT they are stripped after the dSYM file already exists and not before as is the case with the static library.

Does the dSYM file contain the debugging symbols of the static library?

However, dumping the content of the dSYM file that is generated as part of the archive reveals that it does not contain the debugging symbols of the static library ( lib.xcodeproj ). To be more specific, executing the command


2 Answers

You are correct, set it to YES for AppStore build and NO for debugging builds. Even when you build you AppStore version, there is dsym file containing all symbols you need to symbolicate your crash logs.

like image 93
Thomas Bartelmess Avatar answered Oct 03 '22 19:10

Thomas Bartelmess


A dSYM file is nothing a "debug symbols file". It is generated when the "Strip Debug Symbols" setting is enabled in the build settings of your project.

The default debug info format for the Debug configuration for new iOS projects is "DWARF with dSYM file", but for new OS X projects is just "DWARF".

If you're running under the debugger, of course, it will just stop at the point of the crash, so you don't need to symbolicate a crash report.So set 'DWARF' when application is in development and set 'DWARF with dSYM' at the time of release.

You should apply this settings as well:

enter image description here

like image 44
Banker Mittal Avatar answered Oct 03 '22 20:10

Banker Mittal