我有一个这样配置的 XCode 项目:
- 项目格式:兼容 XCode 3.1
- 架构:标准(armv6 armv7)
- 基础 SDK:最新 iOS(当前设置为 iOS 4.2)
- 仅构建活动架构:未选中
- 有效架构:armv6 armv7
我的问题:生成的二进制文件 (.ipa) 中是否有 2 个可执行文件 - 每个架构一个,或者每个架构只有一些不同的目标文件,或者拆分比这更细?
只是好奇。谢谢。
根据您的描述,ipa 应该具有带有 arm6 和 arm7 的多架构二进制文件。您可以使用file
终端中的命令进行检查。在您的应用程序包内部是一个可执行文件,它将与应用程序同名myApp.app/myApp。输入:
file myApp.app/myApp
然后在终端中将打印它包含的内容供您仔细检查。它应该列出 2 个架构。
It will produce two binaries and then stick them together in a so-called "fat binary". You can play around with sticking multiple architectures in the same executable yourself using the lipo
command.
To clarify: You will have two executables inside a single file. This is logically a single executable (both are your app), but one version targets one architecture and the other version targets the other architecture.