Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find if an ipa file is 32 or 64-bit. (macos/unix)

We have multiple archives in our build location. Is there a way to identify if it is 32 or 64-bit based. So that I can group them accordingly.

I tried file command. but it didn't give the info I look for.

MYMAC:~ userid$ file MyApp.ipa
MyApp.ipa: Zip archive data, at least v1.0 to extract

I searched internet for this and I couldn't find one. Can someone please point me in right direction ?

We have a repo at unix as well. Atlas, if I am able to identify in Mac , I can sync it up with unix's list.

like image 671
Maheswaran Ravisankar Avatar asked Nov 15 '14 10:11

Maheswaran Ravisankar


1 Answers

First, try unzip the ipa file to a directory, eg:

unzip <filename>.ipa -d ~/Downloads/tmp

Second, use file command to identify the architectures, eg:

file ~/Downloads/tmp/Payload/<appname>.app/<app>

Then, you will have what you want~

~/Downloads/tmp/Payload/<appname>.app/<app>: Mach-O universal binary with 2 architectures
~/Downloads/tmp/Payload/<appname>.app/<app> (for architecture armv7):  Mach-O executable arm
~/Downloads/tmp/Payload/<appname>.app/<app> (for architecture cputype (16777228) cpusubtype (0)):      Mach-O 64-bit executable
like image 84
BrantXiong Avatar answered Oct 21 '22 20:10

BrantXiong