How to: Xamarin.iOS, generate link map during build

In order to generate link map in Xamarin Studio for your Xamarin iOS application, please specify following string as mtouch arguments in Xamarin.iOS project, section “iOS Build”:

-gcc_flags “-Wl,-map,${TargetDir}/link.map”

 

Xamarin.iOS mtouch arguments for generating link map

Xamarin.iOS mtouch arguments for generating link map

When the link map might be useful?

For example, your app exceeded 100mb limit and (according to Apple Store rules, ATM) will not be available for download using cellular connection, only available for Wi-Fi. In that case you will want to know what takes all that space.

Rule #1 in that case is images.

Rule #2 is code. That is where you will need link map to see which dlls/references took most space in your .exe file.

P.S.: Regarding 100mb limit, there is an interesting thread on Xamarin Forums:  100+mb Xamarin.IOS build size