Symbol File Management
Android Symbolization
Use and upload of Java symbol file tool
The Tingyun SDK provides two ways to upload mapping files.
- Upload via report
- Automatic upload of files through tingyun.properties
Upload Mapping file through report
-
Log in to Tingyun Report, select the Exception analysis module, click the Breakdown card, and click Manage Symbol List in the upper right corner of the "Crash List".
-
Find the corresponding version and upload the local Mapping file.
By default, the symbol file upload is sorted according to the data receiving time of the application version, and supports retrieval according to the application version. One version supports uploading multiple files.
Automatic upload of files through tingyun.properties
Automatically upload the Mapping file through the Tingyun. Properties file. The SDK needs to be version 2.15.7 or above.
Explain: If the "tingyun.properties " file does not exist in your project, you need to create the file in the project app directory and the root directory.
-
Configured in the tingyun.properties file.
uploadAddress=*The main domain for accessing the Tingyun login dashboard(For example:https://wukong2.tingyun.com)*
appKey=*Tingyun AppKey*
mapping_file_auto_upload=true -
Turn on the obfuscator.
The mapping_file_auto_upload control switch takes effect only when the obfuscator is enabled. After the control switch is enabled, the mapping file in the local directory will be automatically uploaded to the Tingyun server by the Tingyun SDK. If the obfuscator is not enabled, the configuration item does not take effect.
Use and upload of Native symbol file tool
In order to quickly and accurately locate the code location where Native Crash occurs in the application, the Tingyun uses the symbol file file to parse and restore the application crash stack.
Original stack:
Post-restore stack:
symbol file extraction requirements
The symbol file tool nbs.newlens.so.parse.Jar is a tool provided by Tingyun App for developers to extract symbol file files. Extracting the symbol file requires the symbol file tool and the Debug SO file (an SO file with debug information). By default, the SDK will automatically generate a symbol file file in the Tingyun folder of the project root directory when compiling the release version. You can also generate the symbol file file manually using the symbol file tool.
Tool options
Options | Explain |
---|---|
-i | Specify the so folder path |
Generate a symbol file file
The command to generate a symbol file file using the symbol file tool's JAR package is as follows:
java -jar nbs.newlens.so.parser.jar -i E:\JNIDemo\jniLibs //Specified directory
The generated symbol file file NewlensSymbol. Zip is located in the symbol file tools directory.
Notice: Only zip format
-i
is supported for the symbol file file uploaded by the Tingyun. For the parameter, please specify the path of the generated SO folder. The default path is generally app \ build \ intermediates \ cmake \ debug \ obj, and it can also be output to other directories through the CMakeLists. Txt file configuration.
Upload the symbol file
Native symbol file files currently only support report uploading.
-
Log in toTingyun Report, select the Exception Analysis module, click the Breakdown card, and click Manage Symbol List in the upper right corner of the "Crash List".
-
Select Native symbol a tab and click Select a file Upload NewlensSymbol. Zip.
IOS Symbolization
Find the symbol file
-
Find the.xcarchive file of the project, and then right select "Show in Finder" to enter the file directory.
-
Right-click the.xcarchive file and select Show Package Contents.
-
Select the corresponding ".App.DSYM" file, such as "HelloWorld.App.DSYM", and right-click "Show Package Contents".
Notice: The marked part in the figure below is the symbol file file. Please upload this file instead of XXX.App.DSYM this directory.
Upload symbol file file via script
Upload the symbol file file through the Xcode + sh script. The operation steps are as follows.
-
Paste the contents of the tingyun.sh in the unzipped SDK package into the location below the shell in the figure above.
-
Configure the corresponding APP_KEY and UPLOAD_URL in the above figure.
-
Add in Input Files:
-
To call the following interface, change the value of VERSION in the script to be consistent with the versionName set by the interface.
(void)setVersionName:(NSString *)versionName;
-
If the following interface is called and useBuildVersion is YES, change the value of VERSION in the script to be consistent with the version number of CFBundleVersion (xcode-> General-> Identity-> Build).
+(void)startWithAppID:(NSString*)appId location:(BOOL)locationAllowed rateOfLaunch:(double) rate channelId:(NSString *)channelId useBuildVersion:(BOOL)useBuildVersion;
-
Upload symbol file file through report
-
Log in toTingyun Report, select the Exception Analysis module, click the Breakdown card, and click Manage Symbol List in the upper right corner of the "Crash List" below.
-
Click Add to the button on the right side of the corresponding application version number in the pop-up window, and then click the Select a file button at the bottom to manually upload the symbol file. As shown in the following figure:
Uploading a symbol file from the command line
-
Open the terminal, enter HelloWorld the directory of the symbol file, that is, the HelloWorld.App.DSYM/Contents/Resources/DWARF, and enter the following command:
curl -k -F file=@HelloWord -F buildVersion=CFBundleVersion -F shortVersion=CFBundleShortVersionString UPLOAD_URL/app-api/symbol/appkey/APP_KEY
-
Command line parameter configuration:
HelloWorld : Symbol file name
CFBundleShortVersionString : Major version number(xcode->General->Identity->Version)
CFBundleVersion : build version number(xcode->General->Identity->Build)
UPLOAD_URL : The main domain for accessing the Tingyun login dashboard (For example:https://wukong2.tingyun.com)
APP_KEY: The authorization key for accessing the Tingyun App is typically referred to as the "API Key". -
Upload symbol file: After the configuration is completed, the symbol file can be uploaded to the Tingyun server through the command line. When SUCCESS appears, it indicates that the upload is successful.
{
"status": "SUCCESS",
"message": "result: file name: HelloWord;builds : 44818402-CFA4-39E4-90B7-953914DE8A23,60ABFC59-0513-314D-8E66-BD81EC0FF1D2;SHA-1 : "
} -
The execution command and results are shown in the figure below: