views:

527

answers:

3

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

Is there a way to make it smaller?

+1  A: 

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.

Daniel Auger
I am listening to Miguel's podcast and he says it should be possible
tom greene
Miguel is the one who put Mono Touch together, so he may be the best person to ask about reducing Mono's footprint.
Alex Reynolds
Miguel, are you reading?
tom greene
url to miguel's podcast?
AngryHacker
+13  A: 

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.

miguel.de.icaza
MonoTouch 1.1 is now available and addresses this issue. See http://monotouch.net/Releases/MonoTouch_1.1
Sly
A: 

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

Tony Tromp