locked
iOS App Size RRS feed

  • Question

  • User38250 posted

    When using Xamarin Forms the release version of the iOS application is drastically larger than the Android version of the same application.

    What is causing the large app size? Is the size exponential based on the amount of code we have in our app or a one time cost (ie: Mono is 10MB?)

    My question comes from reading this article:

    http://windingroadway.blogspot.com/2014/12/mobile-development-platform-performance.html

    Thursday, January 29, 2015 5:52 PM

Answers

  • User181 posted

    Xamarin Android apps are not ahead-of-time compiled because Android allows just-in-time compiling. When you compile IL code into machine code the code size gets bigger (we found a while back that it was about a 3x increase). On Android you only get that in memory, but on iOS you see it in the shipping app. It's actually worse now because you would typically build an iOS app for up to 3 architectures (armv7, armv7s, and arm64), which means there are up to three different versions of the compiled machine code that get built into your app.

    You can mitigate this a bit by using the linker, which strips out unused parts of the app and (optionally) also the SDK (both the iOS bindings libraries and the C# core libraries), but there is no way around the fact that the app is going to be significantly bigger on iOS compared to Android.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, January 29, 2015 7:39 PM