Xamarin iOS ipa文件大小问题 [英] Xamarin iOS ipa file size issue

查看:226
本文介绍了Xamarin iOS ipa文件大小问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基于PCL的方法的项目结构:

Project structure with PCL based approach:

项目X(解决方​​案)

Project X (solution)

  • 核心(带有用于基于Ioc的设置的autofac的基础项目)
  • 项目(droid和ios通用代码的90%)
  • Project.Droid(Droid设置,渲染器和图形.)
  • Project.iOS(iOS设置,渲染器和图形.)

我已经通过所有可能的选项来减小ipa文件的大小.尤其是链接. 我使用了全部链接"并剥离了调试代码,优化了图像等.

I have gone through all possible options to reduce ipa file size. esp with linking. I have used 'Link all' and stripping debug code, optimizing image etc.

最终ipa大小为77 MB.

Final ipa size is 77 MB.

这里是在探索软件包内容之后的文件大小的详细信息.我正在使用7号和64号拱门.

Here are the details of file sizes after exploring package contents. I am using arch 7 and 64.

项目.iOS为42 MB 这很麻烦.由于我可以分别看到dll和图像以及此文件.不知道为什么要占用这么多空间.我可以缩小尺寸吗?这是我的首要任务

Project.iOS is 42 MB This is bothering. Since I can see dll's and images separately along with this file. Not sure why its taking so much space. Can I reduce the size of it ? This is my priority

dll的大小约为15 MB (Xamarin表单,地图和其他第三方库.由于我的目标是7和64.我看到libraryX.dll,libraryX.aotdata.arm64,libraryX.aotdata.arm7) 我相信这是对的.

dll's are about 15 MB (Xamarin forms, maps, other third party libraries. Since I am targeting for 7 and 64. I see libraryX.dll, libraryX.aotdata.arm64, libraryX.aotdata.arm7) This is right I believe.

图片大约20 MB

我正计划通过使用' https://tinypng.com/'展平并进一步缩小将所有图片资源都变细".也可能想使用按需资源选项,但优先级较低

I am planning to reduce even further by using 'https://tinypng.com/' to flaten and putting all images assets for 'thinning'. Also probably wants to use on demand resources option but its low priority

请让我知道.任何帮助/建议都将不胜感激.

Please let me know. Any help / suggestion would be very much appreciated.

Xamarin论坛链接:

Xamarin Forum link : https://forums.xamarin.com/discussion/103470/xamarin-ios-file-size-is-too-big-tried-all-the-possible-options/p1?new=1

谢谢.

推荐答案

使用图标字体将有助于减小IPA的大小,因为您将用字体中的矢量图形替换图标的多个版本.我在这种方法上取得了很多成功. 此处的详细信息

Using an icon font would help to reduce the size of your IPA as you would be replacing multiple versions of icons with a vector graphic from the font. I have had a lot of success with this approach. Details here and also here

这篇关于Xamarin iOS ipa文件大小问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆