[英]Support armv6 and armv7 in the same ipa
I have an XCode project configured like this: 我有一个像这样配置的XCode项目:
My question: Does the resulting binary (.ipa) have 2 executables in it - one for each architecture, or just some different object files for each architecture or is the split even finer grained than that? 我的问题:生成的二进制文件(.ipa)中是否有2个可执行文件 - 每个体系结构一个,或者每个体系结构只有一些不同的目标文件,或者是比这更精细的分割?
Just curious. 只是好奇。 Thanks. 谢谢。
From what you described, the ipa should have a multi-architecture binary with both arm6 and arm7. 根据您的描述,ipa应该具有arm6和arm7的多架构二进制文件。 You can check it with the file
command in terminal. 您可以使用终端中的file
命令进行检查。 Inside of your app bundle is a executable that will have the same name as the app, myApp.app/myApp . 应用程序包内部是一个可执行文件,其名称与应用程序myApp.app/myApp相同 。 Entering: 输入:
file myApp.app/myApp
in terminal will then print what it contains for you to double check. 然后在终端中打印它包含的内容供您仔细检查。 It should list the 2 architectures. 它应该列出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. 您可以使用lipo
命令自己在同一个可执行文件中使用多个体系结构。
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. 这在逻辑上是单个可执行文件(两者都是您的应用程序),但一个版本针对一个架构,另一个版本针对其他架构。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.