位于文件系统中的iOS框架二进制文件在哪里? [英] Where are the iOS frameworks binaries located in the filesystem?

查看:172
本文介绍了位于文件系统中的iOS框架二进制文件在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对iOS上的框架感到困惑。我认为它们基本上是一个包含动态库,标题和资源的目录。

I'm kind of confused about frameworks on iOS. I think they are basically a directory containing a dynamic library, headers and resources.

但在我的设备中,System / Library / Frameworks中的框架目录不包含动态图书馆。这怎么可能?当需要它的应用程序启动时,它是否应该加载到内存中?

But in my device the frameworks directories in System/Library/Frameworks don't contain the dynamic library. How is this possible? Shouldn't it be present to be loaded in memory when the application requiring it is launched?

推荐答案

二进制文件不再存在于-device(自从iOS 3.1开始):Apple已将它们全部合并为一个大的 mmap()'ed缓存文件,以使应用程序启动更高效。由于页面通常永远不会改变,因此内核可以在每个运行的图像之间有效地共享它们您仍然可以对缓存中保存的文件使用 dlopen(),因为 dyld 在给定时短路文件查找库存在于缓存中。

The binaries no longer exist on-device (and have not since iOS 3.1): Apple has merged them all into one large mmap()'ed cache file, to make app launch a bit more efficient. As the pages usually never change, the kernel can effectively share them between every running image. You can still use dlopen() on files held within the cache, as dyld short-circuits file lookup when the given library exists in the cache.

缓存文件位于 /System/Library/Caches/com.apple.dyld ,并以架构命名( armv6 armv7 )。可以使用提取其中的库。 dsc_extractor 或KennyTM的dyld_decache,可在此存储库中 ,但一次提取它们实际上无法正确加载到内存中(因为它们都有效地将它们的符号表合并到缓存中。)

The cache file is in /System/Library/Caches/com.apple.dyld, and is named after the architecture (armv6 or armv7). The libraries within can be extracted using dsc_extractor or KennyTM's dyld_decache, available in this repository, but once extracted they can't actually be loaded into memory properly (as they all effectively get their symbol tables merged in the cache.)

有一些更好的(虽然较旧)这里写的内容不太明确,更深入): http:// blog.howett.net/2009/09/cache-or-check/

There's a bit of a better (though older and less informed, more in-depth) write-up here: http://blog.howett.net/2009/09/cache-or-check/.

这篇关于位于文件系统中的iOS框架二进制文件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆