我正在努力让我了解iOS上运行的应用程序会发生什么。 我可以在/Developer/Platforms/iPhoneOS.platform下看到有几个dylib可能与使用某些框架相关联? 在任何情况下,我的问题都是一般性的:如果出于某种原因,iOS应用程序是依赖于官方(即Apple提供的)dylib构建的,那么在iDevice上运行时运行时会发生什么?
我认为2)应该发生什么,但我不确定,也找不到任何明确说明的地方。
答案 0 :(得分:1)
是的,你的权利是2)图书馆是动态链接的。您可以使用otool
进行调查,例如:
$ cd /path/to/App.app
$ lipo -info appbinary
Non-fat file: appbinary is architecture: armv7
$ otool -L appbinary
appbinary:
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 675.0.0)
/System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 881.0.0)
/System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 1600.0.0)
/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics (compatibility version 64.0.0, current version 600.0.0)
/System/Library/Frameworks/QuartzCore.framework/QuartzCore (compatibility version 1.2.0, current version 1.7.0)
/System/Library/Frameworks/OpenGLES.framework/OpenGLES (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/OpenAL.framework/OpenAL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration (compatibility version 1.0.0, current version 432.0.0)
/System/Library/Frameworks/CFNetwork.framework/CFNetwork (compatibility version 1.0.0, current version 548.0.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 53.4.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 161.1.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 6.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)