zgzczzw / Linkmapparser
A tool for parsing iOS app link map file.
Stars: ✭ 117
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Linkmapparser
Nextgrowingtextview
📝 The next in the generations of 'growing textviews' optimized for iOS 8 and above.
Stars: ✭ 1,540 (+1216.24%)
Mutual labels: xcode
Moderncppci
This is an example of doing a Modern C++ project with CI
Stars: ✭ 109 (-6.84%)
Mutual labels: xcode
React Native Settings
Allows access to various Android and iOS device settings using React Native
Stars: ✭ 108 (-7.69%)
Mutual labels: xcode
Device
Light weight tool for detecting the current device and screen size written in swift.
Stars: ✭ 1,503 (+1184.62%)
Mutual labels: xcode
Xcodecleaner
Cleaner for Xcode.app built with react-native-macos
Stars: ✭ 1,505 (+1186.32%)
Mutual labels: xcode
Appicon
AppIcon generates *.appiconset contains each resolution image for iOS
Stars: ✭ 1,454 (+1142.74%)
Mutual labels: xcode
Shari
Shari is the alternative to the library of UIPickerView(drum roll) in Swift. You can select a item using UITableView.
Stars: ✭ 111 (-5.13%)
Mutual labels: xcode
Perspectivetransform
Calculate CATransform3D between two Perspectives
Stars: ✭ 113 (-3.42%)
Mutual labels: xcode
React Native Paystack
React Native Wrapper for the Paystack Native Mobile SDKs
Stars: ✭ 106 (-9.4%)
Mutual labels: xcode
Hmap
hmap is a command line tool written in Swift to work with Clang header maps produced by Xcode.
Stars: ✭ 110 (-5.98%)
Mutual labels: xcode
Finicky
A macOS app for customizing which browser to start
Stars: ✭ 2,026 (+1631.62%)
Mutual labels: xcode
Microfeatures Example
📦📱 Example of iOS app built using the uFeatures architecture
Stars: ✭ 112 (-4.27%)
Mutual labels: xcode
LinkMapParser
背景
LinkMapParser是一个可以帮助开发者分析Xcode生成的link map文件的工具。Xcode生成的link map文件中记录了iOS程序包的各个组成部分,包括所有的类、方法及变量等等。通过分析这个文件,可以知道程序包中各个模块的体积大小,以用于后续优化。
使用方法
1. 安装Python环境
LinkMapParser是一个Python脚本,运行该脚本需要开发者的机器有Python的运行环境,安装Python的方法可以查阅相关资料。Python版本为2.7。
2. 生成link map文件
Xcode默认是不生成link map文件的。生成link map文件需修改项目中的Build Settings,选择Target的Build Settings,修改Write Link Map File为Yes,修改Path to Link Map File为你需要的地址,然后编译程序,即可在该地址生成相应的link map文件。
3. 运行工具
该工具支持分析一个link map文件和比较两个link map文件,运行的命令分别为:
分析一个link map文件
python parselinkmap.py $map_link_file_path
输出结果类似于:
================================================================================
demoData/TestCleanPackage-LinkMap-normal-x86_64.txt各模块体积汇总
================================================================================
Creating Result File : demoData/BaseLinkMapResult.txt
AppDelegate.o 0.01M
ViewController.o 0.00M
TestCleanPackage.app.xcent 0.00M
UnUsedClass.o 0.00M
main.o 0.00M
libobjc.tbd 0.00M
linker synthesized 0.00M
Foundation.tbd 0.00M
UIKit.tbd 0.00M
总体积: 0.01M
demo中只有一个Bundle,可以看出各个class文件在安装包中所占大小,如AppDelegate占用0.01M。
比较两个link map文件
python parselinkmap.py $base_map_link_file_path $target_map_link_file_path
LinkMapParser会分析两个map link文件,然后比较各个模块的体积是否有变化,最后列出体积变大的模块。
输出结果类似于:
================================================================================
demoData/BaseLinkMap.txt各模块体积汇总
================================================================================
Creating Result File : demoData/BaseLinkMapResult.txt
AppDelegate.o 0.01M
ViewController.o 0.00M
TestCleanPackage.app.xcent 0.00M
UnUsedClass.o 0.00M
main.o 0.00M
libobjc.tbd 0.00M
linker synthesized 0.00M
Foundation.tbd 0.00M
UIKit.tbd 0.00M
总体积: 0.01M
================================================================================
demoData/TargetLinkMap.txt各模块体积汇总
================================================================================
Creating Result File : demoData/TargetLinkMapResult.txt
AppDelegate.o 0.64M
ViewController.o 0.00M
TestCleanPackage.app.xcent 0.00M
UnUsedClass.o 0.00M
main.o 0.00M
libobjc.tbd 0.00M
linker synthesized 0.00M
Foundation.tbd 0.00M
UIKit.tbd 0.00M
总体积: 0.64M
================================================================================
比较结果
================================================================================
模块名称 基线大小 目标大小 是否新模块
AppDelegate.o 0.01M 0.64M
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].