Question

I created a simple hello world mono touch (iPhone) application. However, its size is 5MB.

Is there a way to make it smaller?

Was it helpful?

Solution

This is from the mailing list post today:

In addition to this thread, I wanted to give folks a heads up on what we have been up to with MonoTouch and disk/memory usage.

  • New ARM optimizations.

    In the upcoming version of MonoTouch, a new ARM optimization will for example reduce mscorlib native code by 300k. So it will go from 800k to 500k. You can expect the same kind of savings in other assemblies as well.

    This was implemented by a technique that reuses many of the wrapper functions that Mono uses to shared wrappers.

  • Enhanced Linker

    The linker is improving, and it will no longer for example pull any of Mono.Security.dll, unless you use the http stack. This in the example below will remove some 300k from the final distribution as well.

    The linker is still too conservative, and we will continue to enhance it to be more aggressive and remove more code.

  • In general

    Since we started, one of our goals to ensure that we would have a small footprint, so we invested significant time on our linker, and we continue to invest in it.

OTHER TIPS

Mono apps on the IPhone include the Mono runtime so you can't really get much smaller than 5mb. See this related question

EDIT: As per Miguel's answer, it appears the minimum footprint is about to shrink considerably.

Try using the linker options. Link SDK only or Link all assemblies.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top