[英]How to run fat binaries on iOS 5.1 / iPhone 4
I am developing an application for jailbroken iOS devices. 我正在为越狱的 iOS设备开发应用程序。
I'd like to target booth iPhone 3G (iOS 4.3.x) and iPhone 4/4S (iOS 5.x) 我想定位iPhone 3G(iOS 4.3.x)和iPhone 4 / 4S(iOS 5.x)的展位
I successfully generated fat binaries with Xcode 4.3.x 我使用Xcode 4.3.x成功生成了胖二进制文件
marsu:LatestBuild sst$ otool -h myproduct.armv6
myproduct.armv6 (architecture armv7):
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
0xfeedface 12 9 0x00 2 20 2664 0x00200085
myproduct.armv6 (architecture armv6):
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
0xfeedface 12 6 0x00 2 19 2648 0x00000085
Running this on an iPhone 3G is OK Running this on an iPhone 4, I received 可以在iPhone 3G上运行它,可以在iPhone 4上运行
iPhone:~ root# ./myproduct.armv6
Killed: 9
While running the armv7 only build on the iPhone 4 is OK. 运行armv7时,仅在iPhone 4上构建即可。
What am I missing ? 我想念什么?
PARTIALLY SOLVED : 部分解决:
Problem is that ldid can not sign fat binaries. 问题是ldid无法签署胖二进制文件。 See Building for Jailbroken devices on iOS SDK 4.2 for details.
有关详细信息,请参见在iOS SDK 4.2上构建越狱设备 。
I found this ldid source code that is supposed to sign fat binaries https://github.com/rpetrich/ldid but it does nor work for me (ldid hangs at runtime) 我发现了这个ldid源代码,该源代码应该对胖二进制文件进行签名https://github.com/rpetrich/ldid,但是它对我没有用(ldid在运行时挂起)
Solution probably is to use lipo tool to split the binary in two executables, ldid them separately and reassemble into one executable. 解决方法可能是使用lipo工具将二进制文件拆分为两个可执行文件,分别标识它们并重新组装为一个可执行文件。 (doesn't work for me either but I am working on it)
(对我也不起作用,但我正在努力)
cd MyApp.app/;
lipo MyApp -extract armv6 -output MyApp6;
lipo MyApp -extract armv7 -output MyApp7;
ldid -S MyApp6; ldid -S MyApp7;
lipo -create MyApp6 MyApp7 -output MyApp
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.