简体   繁体   English

Xamarin中的iOS构建大小

[英]iOS Build size in Xamarin

I am working on Xamarin for an iOS application. 我正在为iOS应用程序开发Xamarin。 I just added 2-3 view controllers and the build size goes upto 8MB+. 我刚刚添加了2-3个视图控制器,构建大小达到8MB +。 I have gone through the Tamarin Evolve video for various settings and tried that but but size is not reducing. 我已经浏览了Tamarin Evolve视频的各种设置,并尝试了该设置,但尺寸并未减小。 Can anyone suggest me some settings/steps to reduce the build size? 谁能建议我一些设置/步骤来减少构建大小?

Thanks 谢谢

The first couple of MB of app size are the Xamarin.iOS C# runtime environment. 应用程序大小的前两个MB是Xamarin.iOS C#运行时环境。 There is no way to link thins out of your app as there is no shared runtime model on iOS as is on Android for example. 无法将精简版链接到您的应用程序,因为iOS上没有共享的运行时模型,例如Android上。 Your typical Xamarin.iOS app no matter how small doesn't get much smaller than the size of the runtime + some overhead. 无论大小多么小,典型的Xamarin.iOS应用程序都不会比运行时大小加上一些开销小得多。

You can try to reduce the app size by playing with different Linker settings. 您可以尝试通过使用不同的链接器设置来减小应用程序的大小。 Right click on the project file, choose Options and select Build. 右键单击项目文件,选择“选项”,然后选择“生成”。 Under iOS Build play with the Linker options. 在iOS Build下,使用链接器选项播放。

Also important is the build configuration. 构建配置也很重要。 Debug builds are a way bigger than release builds in my experience. 根据我的经验,调试版本比发布版本大。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM