iOS IPA file size - xcode-archive vs. xcodebuild command
Asked Answered
S

1

6

I have encountered a problem where the size of iOS application file (IPA) is different between a file built using XCode-GUI archive action and the one created using a command-line build (xcodebuild command). The size matters because we're getting the following message from Apple:

The app binary listed below was 44.6 MB when you submitted it, but will be 51.2 MB once processed for the App Store. This exceeds the cellular network download size limit and would require your app to be downloaded over Wi-Fi

The IPA file built with Xcode is 7MB smaller than the one built with XCodeBuild command.

The command line I'm using: /usr/bin/xcodebuild -sdk iphoneos -configuration Release ARCHS=armv7 VALID_ARCHS=armv7

Swish answered 15/7, 2013 at 8:48 Comment(0)
S
9

Problem solve by adding the following switches to the command line:

DEPLOYMENT_POSTPROCESSING=YES

STRIP_INSTALLED_PRODUCT=YES

SEPARATE_STRIP=YES

COPY_PHASE_STRIP=YES

I see those settings also in the XCode project file and in the GUI but - for some reason - running the 'Release' configuration do it without those settings.

Swish answered 15/7, 2013 at 11:11 Comment(1)
Out of curiosity, I tested which of these options was responsible for producing the smaller binary. DEPLOYMENT_POSTPROCESSING=YES was all I needed. You should accept this answer. Thanks, that was driving me crazy.Richella

© 2022 - 2024 — McMap. All rights reserved.