发布于 2017-08-24 14:03:14
我准备了一个脚本,其中包含两个参数,
并优雅地输出MyApp_symbolicated.crash
剧本:
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Argument missing [symbolicate @logLocation @xcarchiveLocation]"
exit 0
fi
if test -e "$1"; then
echo "$1 exists"
else
echo "$1 does not exist!"
exit 1
fi
if test -e "$2"; then
echo "$2 exists"
else
echo "$2 does not exist!"
exit 1
fi
parentdir=`pwd`
export DEVELOPER_DIR=`xcode-select -p`
PATH=$PATH:$DEVELOPER_DIR
echo $PATH
cd $DEVELOPER_DIR
cd ../SharedFrameworks/
commanddir=`pwd`
command=$commanddir/`find . -name symbolicatecrash`
cd $parentdir
crashlog="$1"
archive="$2"
outputdir=`dirname "$crashlog"`
nfile=$(echo $1 | rev | cut -f 2- -d '.' | rev)
outputfile="$nfile"_symbolicated.crash
echo $nfile
desymfile="$archive"/dSYMs/*.dSYM
$command -v "$crashlog" "$desymfile" > "$outputfile"使用方法:
symbolicate中创建/usr/local/bin/文件chmod 777 symbolicate设置执行权限输出将在崩溃文件的同一个目录中生成。
发布于 2017-08-24 16:04:05
https://stackoverflow.com/questions/26675537
复制相似问题