2016-12-06 53 views
0

我有一个应用程序,使用文件时,报告说,它在Mach-O的2个架构的iOS脂肪的二进制文件和细化了

iPad:~/map/MyApp.app root# file MyApp 
    MyApp: Mach-O fat file with 2 architectures 

编辑 - 我还检查该用Xcode的工具

xcrun -sdk iphoneos lipo -info 
MyApp Architectures in the fat file: MyApp are: armv7 arm64 

当我使用otool定位架构中,我可以看到我有2,ARMv7的(cpusubtype 9)和ARM64(cpysubtype 0)

iPad:~/map/MyApp.app root# otool -arch all -Vh MyApp 
MyApp (architecture cputype (12) cpusubtype (9)): 
Mach header 
    magic cputype cpusubtype caps filetype ncmds sizeofcmds  flags 
MH_MAGIC  ARM   9 0x00  EXECUTE 41  4760 NOUNDEFS DYLDLINK TWOLEVEL PIE 

MyApp (architecture cputype (16777228) cpusubtype (0)): 
Mach header 
    magic cputype cpusubtype caps filetype ncmds sizeofcmds  flags 
MH_MAGIC_64 16777228   0 0x00  EXECUTE 41  5368 NOUNDEFS DYLDLINK TWOLEVEL PIE 

然而,当我尝试使用脂瘦了二进制,我收到以下错误

iPad:~/map/MyApp.app root# lipo -thin armv7 MyApp -output ~/map/myappv7 
-sh: /usr/bin/lipo: Bad CPU type in executable 

任何想法,为什么我不能想出这个特定的二进制? 我更新了我的lipo二进制文件,与之前使用armv7时所说的一样:没有这种类型的架构。

+0

请使用'文件MyApp'仔细检查所包含的切片。 – shallowThought

+0

嗨,我已经这样做了,它在问题的顶部:'MyApp:具有2个架构的Mach-O胖文件' –

+0

啊,对不起。这里提供了更详细的信息。也许尝试使用Xcodes lipo:'xcrun -sdk iphoneos lipo -info MyApp'。也许也为稀疏。 – shallowThought

回答

2

我们有几个问题,我们过去无法用lipo来解释,他们都没有问题,使用Xcode s lipo

试试看:

xcrun -sdk iphoneos lipo -thin armv7 MyApp -output ~/map/myappv7