How to know if your .ipa is 64-Bit

2019-05-11 07:10发布

问题:

I've built an .ipa file with following flags armv7 armv7s and arm64. Is there any way/ tool through which i can make sure the .ipa does have the 64-Bit support?

How does apple find out during app submission if the app binary does have 64-Bit support.

回答1:

One of the options is to use lipo -info %path-to-executable% make sure you are not using path to .app folder or .ipa archive.



回答2:

I have created a script that takes .ipa file as an input and returns what architecture the app supports - (replace and with yours)

ORIGINAL_FILE="<file path>"
FILE_NAME=$(basename $ORIGINAL_FILE)
EXPANDED_DIR="/Users/<username>/Downloads/expanded_app/$FILE_NAME"
PLIST_FILE="$APP_DIR/Info.plist"
APP_DIR="$EXPANDED_DIR/Payload/*.app"
unzip -q "$ORIGINAL_FILE" -d "$EXPANDED_DIR"

executable_file_name=$(/user/rover/PlistBuddy -c "Print CFBundleExecutable" $PLIST_FILE)
EXECUTABLE_FILE="$APP_DIR/$executable_file_name"
app_architecture_list=$(lipo -info $EXECUTABLE_FILE)
echo $app_architecture_list

Now, this app_architecture_list will give you result that will contain armv6 or armv7 or arm64, by which you can figure out.

Note - you will need PlistBuddy for this.