matsuda
3/6/2015 - 2:13 AM

iOSアプリのバイナリのアーキテクチャーを調べる

iOSアプリのバイナリのアーキテクチャーを調べる

$ xcrun lipo
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: one of -create, -thin <arch_type>, -extract <arch_type>, -remove <arch_type>, -replace <arch_type> <file_name>, -verify_arch <arch_type> ... , -info or -detailed_info must be specified
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo [input_file] ... [-arch <arch_type> input_file] ... [-info] [-detailed_info] [-output output_file] [-create] [-arch_blank <arch_type>] [-thin <arch_type>] [-remove <arch_type>] ... [-extract <arch_type>] ... [-extract_family <arch_type>] ... [-verify_arch <arch_type> ...] [-replace <arch_type> <file_name>] ...

/**
 Simulator
 */
// Xcodeの環境設定>Locations>Derived DataからDerived Dataを元に該当するアプリのディレクトリに移動
$ cd /Users/xxxxx/Library/Developer/Xcode/DerivedData/<App name>-<xxxxxxxxxxxx>/Build/Products/<Configuration>-iphonesimulator/<App name>.app

/**
 Device
 */
// Xcodeの環境設定>Locations>Derived DataからDerived Dataを元に該当するアプリのディレクトリに移動
$ cd /Users/xxxxx/Library/Developer/Xcode/DerivedData/<App name>-<xxxxxxxxxxxx>/Build/Products/<Configuration>-iphoneos/<App name>.app

/**
 ipa
 */
// ArchiveしてExport
// xxxxx.ipa を xxxxx.zipに変更してunzip
$ unzip <Exported ipa path>
cd <unziped path>/Payload/<App name>.app
 
$ xcrun ( -sdk iphoneos ) lipo -info <App binary file>