What are the settings in Xcode to strip symbols for an iphone application?
I use these settings in Xcode but still see classnames and their methods in the executable using a binary file editor.
Deployment:
1) Deployment Post processing(checked)
2) Strip Debug Symbols During Copy(checked)
3) Strip Linked Product(checked)
4) Use Separate Strip(checked)
Linking:
5) Dead Code Stripping(checked)
GCC 4.0 - Code Generation
6) Generate Debug Symbols(NOT checked)
Objective-C class and method information can't be stripped - it is necessary for execution. Best you can do is come up with some kind of obfuscation, if you want.
I did it.
I only checked following three settings, other setting is irrelevant.
1) Deployment Postprocessing (checked)
3) Strip Linked Product (checked)
4) Use Separate Strip (checked)
Of course, you need should check "Distribution" version in schema editor.
Then clean!!! and build.
I'v also confirmed that "strip" command is called by Xcode: Show log navigator, select Build .... release, at the bottom, i found progress description:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip /Users/xxx/Library/Developer/Xcode/DerivedData/aaaaa-dytaamkvztdwfreoqteyeijwqdcu/Build/Products/Distribution-iphoneos/aaaaa.app/aaaaa
Finally, I'v checked the result by "nm" command to final product file,
nm -a /Users/xxx/Library/Developer/Xcode/DerivedData/aaaaa-dytaamkvztdwfreoqteyeijwqdcu/Build/Products/Distribution-iphoneos/aaaaa.app/aaaaa
All function name of current app is really stripped. Such as following function name :
000b0a00 t _pj_ioqueue_create
00092ae4 t ___destroy_helper_block_200
00092af8 t ___68-[MyClass myMethod:param2]_block_invoke_21782
Note: objective-C method and property name string are still produced to app file, but that is not symbol name for OS loader, they are just meta data of objective-C class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With