当前位置:网站首页>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 瘦身方法,请给予留言,谢谢
边栏推荐
- CVPR 2022 | greatly reduce the manual annotation required for zero sample learning, and propose category semantic embedding rich in visual information (source code download)
- 学内核之三:使用GDB跟踪内核调用链
- Test evaluation of software testing
- 软件测试之测试评估
- Gorm read / write separation (rotation)
- Can mortgage with housing exclude compulsory execution
- Unittest框架之断言
- MATLAB中tiledlayout函数使用
- 游戏出海,全球化运营
- MongoDB常用28条查询语句(转)
猜你喜欢

【Antd】Antd 如何在 Form.Item 中有 Input.Gourp 时获取 Input.Gourp 的每一个 Input 的value
![[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

使用默认路由作为指向Internet的路由

数据仓库面试问题准备

Doctoral application | West Lake University Learning and reasoning system laboratory recruits postdoctoral / doctoral / research internship, etc

吃透Chisel语言.06.Chisel基础(三)——寄存器和计数器

Hardware Basics - diode Basics

2022 practice questions and mock exams for the main principals of hazardous chemical business units

MySQL之详解索引

好博医疗冲刺科创板:年营收2.6亿 万永钢和沈智群为实控人
随机推荐
find命令报错: paths must precede expression(转)
锐成芯微冲刺科创板:年营收3.67亿拟募资13亿 大唐电信是股东
golang fmt. Printf() (turn)
Haobo medical sprint technology innovation board: annual revenue of 260million Yonggang and Shen Zhiqun are the actual controllers
吃透Chisel语言.06.Chisel基础(三)——寄存器和计数器
Understand chisel language thoroughly 06. Chisel Foundation (III) -- registers and counters
華昊中天沖刺科創板:年虧2.8億擬募資15億 貝達藥業是股東
学习项目是自己找的,成长机会是自己创造的
MySQL version 8 installation Free Tutorial
vscode 常用插件汇总
Read excel table data
The font of markdown grammar is marked in red
IP 实验室月复盘 · 第 5 期
golang fmt.printf()(转)
markdown 语法之字体标红
Detailed explanation of Fisher information quantity detection countermeasure sample code
Test evaluation of software testing
Understand chisel language thoroughly 11. Chisel project construction, operation and test (III) -- scalatest of chisel test
PHP log debugging
R语言ggplot2可视化:gganimate包创建动态折线图动画(gif)、使用transition_reveal函数在动画中沿给定维度逐步显示数据