iOS IPA file size - xcode-archive vs. xcodebuild command

独自空忆成欢 提交于 2019-12-03 07:55:01

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/17650138/ios-ipa-file-size-xcode-archive-vs-xcodebuild-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!