I've been debugging a crash in my C++ binary, built for Release build configuration in Xcode. It was running on a client computer, so the .dSYM file was not available. There was only the binary itself.
The binary was built for a Release build configuration. (I didn't change any other build settings in the Xcode project for it.)
But the crash report in the .ips file gave me names of my functions:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 MyApp 0x10252e678 MyClass::doWriteHere(char*) + 18
1 MyApp 0x10252e4e0 MyClass::performSomeFunction() + 42
2 MyApp 0x10252e2b4 MyClass::DoWork(WORK_TYPE) + 998
3 MyApp 0x10252d950 main + 1190
4 dyld 0x1937e4f28 start + 2246
How do I strip those from my production, or release binary?
EDIT: Changing "Strip Debug Symbols During Copy" to NO or YES makes no difference on the presence of the function symbol names in the production binary.
Does it blindly include function names into the binary thinking that C++
==
Objective-C
?
There's a Deployment Postprocessing
setting in the Xcode project that needs to be enabled for the "release" build to remove private symbols. For some reason it is not enabled by default in the latest version of Xcode. (Source)