Watch App size: Size Limit Exceeded

RenaudLaloireRenaudLaloire BEUniversity ✭✭
edited October 2016 in Xamarin.iOS

Hello,

I'm about to publish the last version of an app with a very light apple watch version to test flight and I'm facing a problem of size package:

ERROR ITMS-90389: "Size Limit Exceeded. The size of watch application has exceeded the 50 MB size limit" :
https://www.evernote.com/l/AMknvW4bneJJm6lxIsAO9r81kbstwaOeQykB/image.png

It is normal the watch app size is 103,7 Mo
https://www.evernote.com/l/AMl2A7Y14PFA5aaN_vMt2_kZ1BBL0_BL964B/image.png

But my iOS app has a size of 54,2 Mo
https://www.evernote.com/l/AMmgJYfSoThEtb7L0ucFwcHEV2vl9KxM4XUB/image.png

The iOS Build settings for my iOS app are: link framework SDKs Only with LLVM compiling:
https://www.dropbox.com/s/488wals4mna35nz/Screenshot 2016-10-05 17.36.41.png?dl=0

For the watch App and the watch App Extension, the same: link framework SDKs Only with LLVM compiling:
https://www.dropbox.com/s/r8463is4hfd70vi/Screenshot 2016-10-05 17.38.04.png?dl=0
https://www.dropbox.com/s/7uve027cfyzqfy3/Screenshot 2016-10-05 17.38.29.png?dl=0

So my question is:

Why the watch app which is very very light (in terms of weight and files) has the double in size package than the iOS App?

Something wrong with my config ? That's the config we are using for all our apps in production and we have the control of the size of our apps.

Is this something that still need to be optimised for the stable version of xamarin watch OS?

Xamarin, have you experienced that issue?

thank you for the feedback

Posts

  • SebastienPouliotSebastienPouliot CAXamarin Team Xamurai

    Why the watch app which is very very light (in terms of weight and files) has the double in size package than the iOS App?

    watchOS 2.x apps must be submitted with bitcode - and that's not a compact representation.

    Something wrong with my config ?

    The above settings looks sane but they don't provide a complete picture. Please open a bug report and attach (privately if you like) your build output. Make sure to include -v -v -v -v in the Additional mtouch arguments so we have the highest level of details available to diagnose.

    Is this something that still need to be optimised for the stable version of xamarin watch OS?

    We're still optimizing things, e.g. the lack of socket in the platform means some of the (managed) networking classes won't work properly. Their code be removed in the next version but, right now, the linker should be doing a very similar job.

    I can point you to a recent master build if you want to try the latest (work in progress) bits.

  • RenaudLaloireRenaudLaloire BEUniversity ✭✭

    Hello Sebastien,

    sorry for my late answer.

    I checked, bit code is well enabled by (true) in the two watch app projects.

    I submitted the build output through bugzilla under the reference 45571.

    KR

  • 5e4ial5e4ial USMember
    edited November 2016

    Hello Renaud,
    Did you find any solution, after extracting the unix executable has a LLVM bundle which is much bigger in size.
    Same issue for me.
    Thanks in advance.

  • RenaudLaloireRenaudLaloire BEUniversity ✭✭

    My issue of the big ipa size was not a bug but too many references to nugget packages like xamarin forms or newtonsoft json for example.

    Look at this directory to see which one is using to much spaces:

    YouriOSWatchAppExtension/obj/iPhone/Release/mtouch-cache

  • dom123dom123 USMember ✭✭

    I have the same issue. With same config parameter as described before.
    I am only referencing newtonsoft json.
    The app is too large ~70MB. There are only couple of screens.
    What is the best way to investigate what is causing the size to be so large?

  • RenaudLaloireRenaudLaloire BEUniversity ✭✭
    edited January 2017

    In my case, I removed the package newtonsoft.json and had to manually parse the json using for example:

    var jArray = (JsonArray)Json.Deserialize(theJson);

    I saved like 10 or 12 Mo like this.

    And to investigate what is causing the size to be so large, see my previous post.

  • dom123dom123 USMember ✭✭

    Ok, thank you, I confirmed that newtonsoft is the culpit for me.
    If your example using "Json.Deserialize()", did you build it yourself? or did you use an existing library?

    Thanks

  • RenaudLaloireRenaudLaloire BEUniversity ✭✭

    No, I built it myself without using a third part library, but it implies more dev, for sure.

  • ramyzramyz LBMember

    I removed newtonsoft from my watch extension, and the app is now 53mb, but im not able to get it below 50mb. I removed any other references. I only have the default references required for the watch app(System, System.Xml, Xamarin.WatchOS).

    I also have Strip native debugging symbols enabled, in addition to Use the LLVM, and Enable Bitcode.
    Am I missing any other thing? Since the watch app only contains 4 interface controllers and some other models.

Sign In or Register to comment.