我有一个链接到通用静态库(.a 文件)的 iOS 项目,同时支持 armv7 和 arm64 架构。当应用程序二进制文件被切片为 App Thinning 的一部分时,该过程是否从 .a 文件中删除了不必要的架构?或者我是否需要以某种方式为每个体系结构提供单独的 .a 文件以在二进制大小方面获得这种好处(如果是这样,我该怎么做)?
最佳答案
细化应该只连接所需的拱门。
来自另一个静态库(包括指向 Apple 关于如何获取 App Thinning 报告的文档的链接):
The IndoorAtlas iOS SDK is a static library compiled for multiple architectures. Only required architectures are linked to the Thinned application. You may test the thinning results locally with these instruction: Testing Your iOS App - "The App Thinning Size Report file contains a summary of the sizes of all variants and the app-thinning.plist file contains more details."
取消链接库,获取基线应用程序瘦身报告。链接库,获取新报告并将它们进行比较。
关于ios - iOS 应用程序切片是否会删除通用静态库中不需要的部分?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45624011/