当前位置:网站首页>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 瘦身方法,请给予留言,谢谢
边栏推荐
- 奇妙秘境 码蹄集
- 吃透Chisel语言.08.Chisel基础(五)——Wire、Reg和IO,以及如何理解Chisel生成硬件
- 【Antd】Antd 如何在 Form.Item 中有 Input.Gourp 时获取 Input.Gourp 的每一个 Input 的value
- MySQL5免安装修改
- [C question set] of VII
- gorm 之数据插入(转)
- 【Antd踩坑】Antd Form 配合Input.Group时出现Form.Item所占据的高度不对
- C# wpf 实现截屏框实时截屏功能
- Can mortgage with housing exclude compulsory execution
- Deming Lee listed on Shenzhen Stock Exchange: the market value is 3.1 billion, which is the husband and wife of Li Hu and Tian Hua
猜你喜欢
205. 同构字符串
数据仓库面试问题准备
Qt如何实现打包,实现EXE分享
Unittest框架中引入TestFixture
测试流程整理(2)
Understand chisel language thoroughly 12. Chisel project construction, operation and testing (IV) -- chisel test of chisel test
Innovation and development of independent industrial software
【R语言数据科学】:交叉验证再回首
華昊中天沖刺科創板:年虧2.8億擬募資15億 貝達藥業是股東
Product identification of intelligent retail cabinet based on paddlex
随机推荐
Gorm data insertion (transfer)
学内核之三:使用GDB跟踪内核调用链
R语言ggplot2可视化:gganimate包创建动画图(gif)、使用anim_save函数保存gif可视化动图
Understand chisel language thoroughly 06. Chisel Foundation (III) -- registers and counters
MySQL version 8 installation Free Tutorial
数据仓库面试问题准备
R语言使用lattice包中的bwplot函数可视化箱图(box plot)、par.settings参数自定义主题模式
IP 实验室月复盘 · 第 5 期
Mask wearing detection based on yolov1
吃透Chisel语言.11.Chisel项目构建、运行和测试(三)——Chisel测试之ScalaTest
【R语言数据科学】:交叉验证再回首
205. 同构字符串
奇妙秘境 码蹄集
LifeCycle
Summary of recent days (non-technical article)
Common content type correspondence table
Product identification of intelligent retail cabinet based on paddlex
Code hoof collection of wonderful secret place
Test evaluation of software testing
安装Mysql