当前位置:网站首页>Xcode 异常图片导致ipa包增大问题
Xcode 异常图片导致ipa包增大问题
2022-07-04 12:51:00 【烟花下的孤独】
APP打包瘦身
起因
因为做APP版本更新,因为本身没有添加太多内容,但是打包之后包体积大小迅速变大,由原来39.1M 变成 53.1M
检查
1、首先检查的第三方,发现并没有添加过大的第三方
2、json文件和gif图,去掉打包之后,体积并没有减少
3、当我去掉了图片之后,包体积明显减少,由53.1M -> 44M
原因
一番检查之后,发现是一张图片的缘故,因为图片切图出现了问题,又恰逢UI跑路,后续自己手动截图导致,如下图所示
虽然截图1.1M ,比原有0.2M并没有大太多,但是打包的ipa体积分别为
53.1 M 和 46.8M,增大了6.5M

主要原因是因为图片截图、或者其他工具处理(时间略长,具体处理方式已经忘记), 所导致了图片类型改变,建议最好使用 UI 切图
我大概估计了一下,没张图片打包之后,ipa包体积至少增加两倍以上
解决
因为切图有问题,但是使用代码适配了问题图片,避免了包体积过分变大
建议
1、尽量使用UI切图,不要自己截图或者非专业切图工具使用,最好也要找个切图工具处理
2、大图影响ipa包,建议图片尽量不要超过100kb,超过50kb也要少放
图片资源以及资源压缩包
截图图片:2x 和 3x

蓝湖切图文件2x 和 3x

如果有更好的 app 瘦身方法,请给予留言,谢谢
边栏推荐
- Understand chisel language thoroughly 09. Chisel project construction, operation and testing (I) -- build and run chisel project with SBT
- PHP log debugging
- MongoDB常用28条查询语句(转)
- Qt如何实现打包,实现EXE分享
- 205. 同构字符串
- golang fmt. Printf() (turn)
- 软件测试之测试评估
- 1200. Minimum absolute difference
- 游戏出海,全球化运营
- 苹果5G芯片研发失败:继续依赖高通,还要担心被起诉?
猜你喜欢

Unity shader learning (3) try to draw a circle

吃透Chisel语言.09.Chisel项目构建、运行和测试(一)——用sbt构建Chisel项目并运行
![[FAQ] summary of common causes and solutions of Huawei account service error 907135701](/img/43/1a9786c89a5ab21d1fb8903cb7b77e.png)
[FAQ] summary of common causes and solutions of Huawei account service error 907135701

使用默认路由作为指向Internet的路由
![[FAQ] Huawei Account Service Error Report 907135701 Common reasons Summary and Solutions](/img/43/1a9786c89a5ab21d1fb8903cb7b77e.png)
[FAQ] Huawei Account Service Error Report 907135701 Common reasons Summary and Solutions

英视睿达冲刺科创板:年营收4.5亿 拟募资9.79亿

Detailed explanation of Fisher information quantity detection countermeasure sample code

瑞吉外卖笔记
![[antd step pit] antd form cooperates with input Form The height occupied by item is incorrect](/img/96/379d1692f9d3c05a7af2e938cbc5d7.png)
[antd step pit] antd form cooperates with input Form The height occupied by item is incorrect

德明利深交所上市:市值31亿 为李虎与田华夫妻档
随机推荐
自主工业软件的创新与发展
ARouter的使用
吃透Chisel语言.09.Chisel项目构建、运行和测试(一)——用sbt构建Chisel项目并运行
【Antd踩坑】Antd Form 配合Input.Group时出现Form.Item所占据的高度不对
吃透Chisel语言.06.Chisel基础(三)——寄存器和计数器
Understand chisel language thoroughly 09. Chisel project construction, operation and testing (I) -- build and run chisel project with SBT
R语言dplyr包summarise_if函数计算dataframe数据中所有数值数据列的均值和中位数、基于条件进行数据汇总分析(Summarize all Numeric Variables)
Understand chisel language thoroughly 03. Write to the developer of Verilog to chisel (you can also see it without Verilog Foundation)
gorm 之数据插入(转)
Unity shader learning (3) try to draw a circle
Migration from go vendor project to mod project
2022 hoisting machinery command examination simulation 100 questions simulation examination platform operation
【R语言数据科学】:交叉验证再回首
R语言ggplot2可视化:gganimate包创建动画图(gif)、使用anim_save函数保存gif可视化动图
Unittest框架中引入TestFixture
Understand chisel language thoroughly 10. Chisel project construction, operation and testing (II) -- Verilog code generation in chisel & chisel development process
MySQL5免安装修改
2022g3 boiler water treatment examination question simulation examination question bank and simulation examination
go vendor 项目迁移到 mod 项目
MySQL 5 installation and modification free