Why are static library symbols not included in dSYM during archive?

家住魔仙堡 提交于 2021-02-06 04:27:10

问题


We have a pretty major application suite for a client with a couple application targets utilizing several static libraries that we made in house. All targets are contained in one XCode project file.

For some reason when archiving an application the dSYM file does not contain any debug symbols for static libraries. The result is when trying to symbolicate crash logs from field agents we cannot see what is going on inside those static libraries.

I attempted to create a new simple XCode project with one application target and one static library. Even then the debug symbols were missing. I fiddled with the build settings according to this https://github.com/TheRealKerni/QuincyKit/issues/91 without luck.

If I build FOR archiving the debug symbols are included. I ran dwarfdump on the resulting dSYM file and was able to see the symbols for the static libraries implementation files. However when I then attempt to archive the project the symbols are excluded.

Am I missing something? XCode version 4.4.1


回答1:


I m using XCode 5.1.1 and was having the same problem.

The fix was to set "Strip Linked Product" setting under "Deployment" section to "No" for each dependent library project. For more detail, please see my post at

can i debug ios app installed from ipa archive




回答2:


This appears to be fixed in a later version of XCode, currently using 4.6 and the problem went away.

If you are stuck using an older version then do the following: Product > Build For > Archiving Product > Archive Open the built product from derived data, you can do this by right clicking on the Youapp.app file in Products group and selecting show in finder. Ensure you are in the Release-xxx folder. Copy the dSYM file generated there and replace the one produced by the archive process. To find where archived files are go to Organizer, Archives tab, right click on an item and show in finder.

Hope this helps.




回答3:


By default, archive uses release build, which already stripe debug symbols. you can change archive build option to 'not stripe'.



来源:https://stackoverflow.com/questions/12501960/why-are-static-library-symbols-not-included-in-dsym-during-archive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!