简体   繁体   English

如何在iOS App中减小__TEXT段的大小?

[英]How can i reduce __TEXT segment size in iOS App?

My App failed to submit due to app size problem before, and the following build options were applied. 由于之前应用大小问题,我的应用未能提交,并且应用了以下构建选项。
So I could submit an app. 所以我可以提交一个应用程序。

*. *。 Dead Code Stripping(DEAD_CODE_STRIPPING) : YES 死代码剥离(DEAD_CODE_STRIPPING):是
*. *。 Enable C++ Exceptions(GCC_ENABLE_CPP_EXCEPTIONS) : NO 启用C ++异常(GCC_ENABLE_CPP_EXCEPTIONS):否

But at this time, I can not submit my App architecture because of the following issue in arm64 architecture. 但是目前,由于arm64体系结构中存在以下问题,我无法提交我的App体系结构。

ERROR ITMS-90122 : "Invalid ExecutableSize. The size of your app`s executable file '******' is 60948500 bytes for architecture 'arm64', which exceeds the maximum allowed size of 60MB." 错误ITMS-90122:“无效的ExecutableSize。对于架构'arm64',应用程序的可执行文件'******'的大小为60948500字节,超过了允许的最大大小60MB。”

Exactly, the size of the '__TEXT,__text' section`s size is overflow. 确实,“ __ TEXT,__ text”部分的大小溢出。 Is there a way to solve this problem while keeping Deployment Target(8.0)? 有没有办法在保留Deployment Target(8.0)的情况下解决此问题?





[My App Build Settings] [我的应用构建设置]

iOS Deployment Target : 8.0 iOS部署目标:8.0
Devices : Universal 设备:通用
Validate Architecture : arm64 armv7 arm7s 验证架构:arm64 armv7 arm7s
Build Active Architecture Only : NO 仅构建活动架构:否

Strip Debug Symbols During Copy : YES 复制期间去除调试符号:是
Strip Linked Product : YES 带状连接产品:是
Strip Style : All Symbols 条形样式:所有符号

DeadCode Stripping : YES DeadCode剥离:是
Optimization Level : Fastest, smallest(-Os) 优化级别:最快,最小(-Os)
Enable C++ Exceptions : NO 启用C ++异常:否


1.reduce template usage. 1.减少模板的使用。 2.convert some data code in _TEXT to _DATA by remove const and static. 2.通过删除const和static将_TEXT中的一些数据代码转换为_DATA。 3.move template class shared data to base class. 3.将模板类共享的数据移动到基类。

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

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