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
It archives your Xcode project by running the xcodebuild archive command and exports the archive into an . ipa file with the xcodebuild -exportArchive command. This . ipa file can be shared and installed on test devices, or uploaded to App Store Connect.
APP size is around 5MB for Android but ipa takes almost the double size 11.4MB.
DESCRIPTION. xcodebuild builds one or more targets contained in an Xcode project, or builds a scheme contained in an Xcode workspace or Xcode project. Usage To build an Xcode project, run xcodebuild from the directory containing your project (i.e. the directory containing the projectname. xcodeproj package).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With