简体   繁体   中英

ipa file size issue in Xamarin iOS

Yesterday i have created IPA file and it was showing estimated app store size is 100 mb and today i also tried to create IPA but its showing estimated app store size is 525 mb.

I read apple instruction for accepting an IPA file :

Apple support maximum size 2GB. Executable size should not be grater then 60 MB.

i saw that "bin" and "obj" are the folder consisting 1.5 and 5.5 gb in my code.and supported architecture set as ARMV7 and ARMV64 with linking behavior as NONE.

Any Solution for reducing the ipa file size?

Xamarin app sizes are slightly bigger than Objective-C apps as the Mono framework is part of the app bundle.

The architectures you build for will also increase the app size as a binary will be created for each one - I suggest that you only build for ARMv7 and ARM64, omitting ARMv7s unless you need to utilise the specific optimisations provided with that architecture.

You can potentially reduce the app size by setting the linker options to link all assemblies in your release configuration. Note that setting the linker to none, as stated in your question, will be detrimental to your app size.

https://developer.xamarin.com/guides/ios/advanced_topics/linker/#Link_all_assemblies

Each nuget package added to your project will also increase the size of your app. However, with the use of the linker, the impact of this will depend on how much of the package you are actually using. Anything unused will be stripped out during the linking process.

You can also reduce your app size by looking at what other assets you have included in your app, such as images, and see if you can save space by making them smaller or increasing compression.

As a final note, after you upload your app to iTunes Connect, the App Store adds it's own encryption to your app which can significantly increase the overall size. As encryption obfuscates patterns, the resulting compressed app will be larger. The impact varies from app to app. Moving data, such as long strings, or tables, out of code and into external files will make the final download smaller, because those files will be compressed more efficiently.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM