以自己写的MVPDemo
为例
1.使用MachOView工具查看, Load Commmands
我们可以看到对应动态库所在的位置
2.使用终端指令otool
(MVPDemo为示例)
otool -L MVPDemo
输出
MVPDemo:
/System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 1560.10.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 1560.10.0)
/System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 61000.0.0)
通过指令,同样可以查看到动态库存放对应的位置