升级到 Xcode 5 后,我的游戏遇到了同样的问题。使用file
,otool
我得到以下结果:
Xcode 4 构建
> file Game.app/Game
Game.app/Game: Mach-O executable arm
> otool -h Game.app/Game
Game.app/Game:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
0xfeedface 12 9 0x00 2 29 3332 0x00218085
Xcode 5 构建
> file Game.app/Game
Game.app/Game: Mach-O universal binary with 2 architectures
Game.app/Game (for architecture armv7): Mach-O executable arm
Game.app/Game (for architecture cputype (12) cpusubtype (11)): Mach-O executable arm
> otool -h Game.app/Game
Game.app/Game (architecture armv7):
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
0xfeedface 12 9 0x00 2 32 3588 0x00218085
Game.app/Game (architecture armv7s):
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
0xfeedface 12 11 0x00 2 32 3588 0x00218085
要防止 Xcode 5 构建胖(armv7
和armv7s
)二进制文件,请转到目标的 Build Settings 并将 Architectures 条目明确设置为 only armv7
(默认值为$(ARCHS_STANDARD)
)。