通过sh脚本获取到描述文件的uuid
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage: getmobileuuid the-mobileprovision-file-path"
exit 1
fi
mobileprovision_uuid=`/usr/libexec/PlistBuddy -c "Print UUID" /dev/stdin <<< $(/usr/bin/security cms -D -i $1)`
echo "UUID is:"
echo ${mobileprovision_uuid}
运行终端输出uuid时,输入
sh脚本路径 描述文件路径
成功获取到uuid,会有输出uuid,例子如下: