8

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.

Maheswaran Ravisankar
  • 17,652
  • 6
  • 47
  • 69
  • try this http://stackoverflow.com/questions/20104403/determine-if-ios-device-is-32-or-64-bit – Anbu.Karthik Nov 15 '14 at 10:40
  • @Anbu.Karthik thanks, but I just have the .ipa file, that question is to find inside the app? – Maheswaran Ravisankar Nov 15 '14 at 10:43
  • oh u have only ipa, u need w/o Xcode u need find the version – Anbu.Karthik Nov 15 '14 at 10:45
  • 1
    the reason you couldn't find an answer online is because ipa is essentially a zipped up file. the only way you will know if its 32 vs 64 bit is by unzipping its content. There is no other quick way to check. – Sam B Nov 15 '14 at 14:07
  • @SamB ok, and after unzipping the content, how do you determine if the `.ipa` file has been compiled for `32-bit` only or for both `32-bit` and `64-bit`? – Teodor Sandu Jan 09 '15 at 10:31

1 Answers1

25

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
BrantXiong
  • 266
  • 4
  • 3