开发中,为了更好的用户体验或者为了bug跟踪,可能会需要使用腾讯的bugly分析工具.但是要使用bugly分析报错需要从dYSM中取出符号表配置上传.
符号表说明: Bugly iOS 符号表配置
使用:
1. 按照bugly官网配置java环境
2. 准备dSYM文件
dSYM文件是指具有调试信息的目标文件,文件名通常为:xxx.app.dSYM
Bugly iOS 符号表配置有说明通过xcode获取或者通过iTunes Connect获取
3. 下载buglySymboliOS.jar
下载最新版Bugly iOS符号表工具.里面有一个buglySymboliOS.jar
文件,然后把该文件和之前下载的dYSM
文件放在同一个文件夹里
4. 准备脚本
创建一个buglydSYMTool.sh
的脚本文件, 将下面代码拷贝到脚本文件中然后终端命令执行
$ bash buglydSYMTool.sh
脚本代码
function printIndroduction {
echo "Bugly符号表上传工具IOS版 -- dSYM Tool for IOS"
echo "适用平台 -- Applicable platform: Linux"
echo "Copyright 2018 calm. All rights reserved."
echo ""
}
function uploadDsym {
files=`find . -name "*.dSYM"`
for fileName in $files; do
#echo "fileName $fileName"
# Appid be6f311993
# Appkey 2ffe1993-0929-4d2e-81cc-a2c34f891993
# package com.calm.app
# version(build) 2.2.0(0.4.9)
java -jar buglySymboliOS.jar -i "$fileName" -u -id "$appid" -key "$appkey" -package "$bundleId" -version "$version"
done
}
# main
printIndroduction
输入app 信息
echo -n "enter the App id: "
read appid
echo -n "enter the App key: "
read appkey
echo -n "enter the App bundleId: "
read bundleId
echo -n "enter the App version: "
read version
echo -n "enter the dsymPath: "
read path
cd "$path"
# Check the Java Environment
CheckJavaVersion=$(java -version 2>&1)
echo "$CheckJavaVersion" | grep -q "Java(TM)"
if [ $? -ne 0 ]
then
echo "----"
echo "系统中未安装Java或者未配置Java环境,请检查!-- Please check if your system has installed Java or configured environment for Java!"
echo "Java官网 -- Java Web Site:www.java.com"
exit 1
fi
# Check the jar
#ShellDir=$(cd `dirname $0`; pwd)
pathName=$(cd `dirname $0`; pwd)
JarName="buglySymboliOS.jar"
JarPath="$pathName/$JarName"
if [ ! -f "$JarPath" ]; then
echo "----"
echo "未找到\"$JarName\"!-- Can not find \"$JarName\"!"
echo "请将\"$JarName\"复制到\"$pathName\"中!"
echo " -- Please copy \"$JarName\" to \"$pathName\"!"
exit 2
fi
# call the function to extract upload
uploadDsym $*
该脚本已上传Github直接下载, 只是一个小工具,不喜勿喷.欢迎star