Skip to content

Instantly share code, notes, and snippets.

@macfanr
Last active January 17, 2018 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macfanr/16871354b808af42c01adc8b2e221a6c to your computer and use it in GitHub Desktop.
Save macfanr/16871354b808af42c01adc8b2e221a6c to your computer and use it in GitHub Desktop.
install name
1. install_name_tool -id new/install/name.dylib libso.dylib //change install name
2. install_name_tool -change old_name new_name libso.dylib //change dependence
3. otool -L libso.dylib //display install name and dependence
4. otool -D libso.dylib //display install name of libso.dylib
注意: 在xcode project中写脚本修改install name 会造成sandbox之后运行奔溃,原因在于copy的时候对dylib签名,然后又去修改dylib内容(change install name),这样中破坏了之前的签名,所以会奔溃
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment