• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    C++
  • Created about 8 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

解析iOS工程中的linkmap文件,方便分析各个模块占用的包大小

为什么要做包瘦身?

Submitting the App to App Review

Your app’s total uncompressed size must be less than 4GB. Each Mach-O executable file (for example, > app_name.app/app_name) must not exceed these limits:

For apps whose MinimumOSVersion is less than 7.0: maximum of 80 MB for the total of all __TEXT sections in the binary.

For apps whose MinimumOSVersion is 7.x through 8.x: maximum of 60 MB per slice for the __TEXT section of each architecture slice in the binary.

For apps whose MinimumOSVersion is 9.0 or greater: maximum of 500 MB for the total of all __TEXT sections in the binary.

iOS 包瘦身浅析

How to use

使用项目目录里LinkMapAnalyzer可执行文件,在命令行中运行。 后面指明要分析的linkMap文件地址

./LinkMapAnalyzer ./GAG-LinkMap-normal-x86_64.txt

也可以将输出重定向保存为其他文件 如:

./LinkMapAnalyzer ./GAG-LinkMap-normal-x86_64.txt > out.txt

Example output:

libAFNetworking.a                                                       317.37KB
libSDWebImage.a                                                         198.61KB
GAG                                                                      68.55KB
libSVPullToRefresh.a                                                     43.76KB
libarclite_iphonesimulator.a                                              7.38KB
unknownModule                                                             2.18KB
libPods-GAG.a                                                             0.25KB