IOS static library compiled with Xcode remembers source files

I have compiled a static library for iOS with Xcode with selected characters. It is compiled in the Release configuration. When I copy the static library to another iOS project (I physically copy it to another directory), I can still browse the source of the static library when navigating through the code. I clicked Show in Finder in the source window and pointed me to the corresponding source file on disk.

I opened the library in a hex editor and really contains the paths to my source files on my machine, as well as a bunch of other text data that should not be displayed.

Am I missing something in the settings of my project? If this is the expected behavior, how can I make sure that the client does not see characters, source file names, etc.?

+4
source share
3 answers

Found compiler options.

In LLVM code generation, set Generate debug symbols to No and Symbols hidden by default to Yes . For some reason, even if you tell him to fade the characters, this will not be done if they are not installed.

+6
source
  • You can check if characters alternate or not with

    nm filename

  • , xcode, , , :

    a) DEPLOYMENT_POSTPROCESSING

    : "STRIP_INSTALLED_PRODUCT ( )".

    b) STRIP_INSTALLED_PRODUCT non-appstore, DEPLOYMENT_POSTPROCESSING YES.

  • ,

    strip YOURBINARYNAME

+1

strip YOURBINARYNAME, @andrei-shender, . :

strip -S YOURBINARYNAME

To get rid of debugging symbols manually. Of course, properly setting up your project is better, but if you create a third-party library using a script provider, you may need to do this manually. Mapbox-native-gl goes from 550mb to 22mb if you split the debugging characters!

+1
source

All Articles