Forum Xamarin Xamarin.iOS

about google maps sdk ~ 52 mb?

HalukmyHalukmy TRMember ✭✭

i just like to use google api in ios but its says dll is 52 mb? its huge bro, some other dll or api is availabile for monotouch?


  • SebastienPouliotSebastienPouliot CAXamarin Team Xamurai

    The binding .dll includes (as a resource) the native, static library.

    That library likely (I have not checked this one) contains code for (at least) x86 (simulator) and ARMv7 (device) and maybe more (e.g. ARMv6, ARMv7, ARM64).

    The extra architecture code won't be part of your application (see [1]). Also depending on the binding project (again I have not checked this one) there are other things that can greatly reduce the final size, e.g.

    • it can have a [assembly: LinkerSafe] attribute - since 99% of the bindings projects (at least the one without custom code) are safe for the managed linker to process (and optimize);

    • it can have the SmartLink = true in it's [LinkWith] attribute. That will allow the native to exclude more, unused native code from your final executable.

    I encourage you to watch my Evolve video [2] if you're curious about the last two points.

    Finally a good way to predict the real size impact would be to build a sample application (there's likely one with the binding project) in iPhone|Release mode and look at it's size. It might not be the optimal size (without some tweaking) but it will give you an idea of the cost of using that native library.

    [1] Shipping a FAT libraries

    [2] Advanced iOS Build mechanics

  • HalukmyHalukmy TRMember ✭✭

    Thank you for explain, im sure after release gets lower size for publish

Sign In or Register to comment.