c# - Monotouch bindings make my apps size huge -
i'm using monotouch create ios apps. i've created bindings chartboost, revmob , others.
the problem i'm having final app has size of 20mb. way such simple game app.
i've checked main app projects dll , 500kb large. binding dlls altogether 19mb.
i'm not sure i'm doing wrong i've done following things no luck: - link native sdks - use armv7 - use llvm - added linkersafe attribute binding projects.
can me out?
your settings sounds sane - there not many details in question can use you. if use several native libraries it's not surprising large applications.
note link native sdks only not exists. it's link sdk assemblies only , applies managed assemblies (not native). still managed linking important allow further optimizations possible.
when add [linkersafe]
in binding project unused code removed (even if link sdk used). quite bit of optimizations on generated binding code (making smaller , faster). make sure (compare before , after sizes) bindings assemblies includes attribute.
you might want use link assemblies maximum savings. again compare before (link sdk) , after (link all) see gains (you might have [preserve]
of code make work, e.g. if use reflection).
there very new feature, smartlink
, remove --force_load
requirement make easier remove native code (e.g. most native libraries). it's hard predict savings (not enough data) lot of binding samples (on github) saved between 250kb 400kb.
note: i'll update answer once video of evolve talk (about build optimizations) available online. in mean time there's quite few older blog post did (and other documents) can optimize size of applications.
Comments
Post a Comment