• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to strip Cocoa Touch frameworks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to strip Cocoa Touch frameworks


  • Subject: Re: How to strip Cocoa Touch frameworks
  • From: João Varela <email@hidden>
  • Date: Thu, 29 Dec 2016 22:28:41 +0000



Yes, I know that and I've tried to use an exported symbols list (cf.
my first mail on this topic) but the real problem is that as soon
as I set "Strip Style" to "All Symbols", archiving the framework is
no longer possible. Xcode reports the following error then:

  "Symbols referenced by indirect symbol table entries that can't be stripped in: ..."


Sorry about my long answer, but it was written before I understood well what was your problem. That was clarified in your last emails. I suggest then that you try the following:

I think if you are using a dynamic library you are not allowed to strip all symbols. According to the man page of strip command, they state: “For dynamic shared libraries, the maximum level of stripping is usually -x (to remove all non-global symbols).” Thus, I think the correct setting of stripping style should be at most non-global symbols, and not all symbols. Usually globals symbols should not be stripped in a dylib. Again according to the strip man page: “If the executable loads objects, however, the global symbols that the objects reference from the executable also must not be stripped. In this case, you should list the global symbols that the executable wants to allow the objects to reference in a file, and those global symbols are then saved  when the executable is stripped. For example: % strip -u -r -s interface_symbols executable where the file interface_symbols would contain only those global symbols from the executable that the executable wants the loaded objects to have access to.”
Perhaps, to have better control of what is happening, after linking I’d use the strip command directly like this:

if [ $CONFIGURATION != 'Release' ]; then
exit
fi

strip -x $BUILD_DIR/$CONFIGURATION/$EXECUTABLE_PATH

However, if you use this script, you have to change the build setting for stripping to debugging symbols only. You then can play around with strip options that satisfy exactly what you want to achieve.

HTH

João
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Related to the "Not finding libraries" - But within a workspace with a static lib not finding project headers in a framework.
  • Next by Date: Re: Not finding libraries
  • Previous by thread: Re: How to strip Cocoa Touch frameworks
  • Next by thread: iOS shared schemes not showing within a workspace.
  • Index(es):
    • Date
    • Thread