I have a shell script that turns a framework into a plain dylib and updates some dependent library paths using install_name_tool
. It works, but if the framework was signed, I get warnings like:
install_name_tool: warning: changes being made to the file will invalidate the code signature in: [redacted].dylib (for architecture x86_64)
I thought I could get rid of the warning by adding
codesign --remove-signature dylib-path
to the script before using install_name_tool
, but then I get errors like
install_name_tool: fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): [redacted].dylib (for architecture x86_64)
Is there a way to fix this?