/YCSymbolTracker

Primary LanguageObjective-CMIT LicenseMIT

YCSymbolTracker

CocoaPods Platform Support License MIT

Brief

This library provides a tracker to track symbols when your app is running. It helps you to export the ordered symbols file which you can use in Build SettingsLinkOrder File.

Installation

YCSymbolTracker is available through CocoaPods.

To install it, simply add the following line to your Podfile:

pod 'YCSymbolTracker'

If you want to track symbols of other static/dynamic libraries, you have to add more lines to your Podfile:

post_install do |installer|
    require './Pods/YCSymbolTracker/YCSymbolTracker/symbol_tracker.rb'
    symbol_tracker(installer)
end

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Objective C

#import <YCSymbolTracker/YCSymbolTracker.h>

NSString *filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"demo.order"];
[YCSymbolTracker exportSymbolsWithFilePath:filePath];

Swift

import YCSymbolTracker

let filePath = NSTemporaryDirectory().appending("/demo.order")
YCSymbolTracker.exportSymbols(filePath: filePath)

Once you export the file, the work is done. You can remove this library in Podfile, and run pod install .

License

YCSymbolTracker is available under the MIT license. See the LICENSE file for more info.


简介

在进行二进制重排的时候,需要导出启动时调用循序的符号表。这个工具就是用来导出这个符号表的,拿到符号表后在Build SettingsLinkOrder File 中配置导出的 xx.order 文件路径就可以了。

安装

YCSymbolTracker 可以通过 CocoaPods 进行安装。

在Podfile中添加以下代码:

pod 'YCSymbolTracker'

如果需要跟踪其他三方库的符号,需要添加下面的代码:

post_install do |installer|
    require './Pods/YCSymbolTracker/YCSymbolTracker/symbol_tracker.rb'
    symbol_tracker(installer)
end

教程

Objective C

#import <YCSymbolTracker/YCSymbolTracker.h>

NSString *filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"demo.order"];
[YCSymbolTracker exportSymbolsWithFilePath:filePath];

Swift

import YCSymbolTracker

let filePath = NSTemporaryDirectory().appending("/demo.order")
YCSymbolTracker.exportSymbols(filePath: filePath)

导出文件之后,就可以把Podfile中相关的配置删掉了,然后执行 pod install