LoginSignup
3
4

More than 5 years have passed since last update.

インストール済みのProvisioning Profileの一覧を取得する

Posted at

インストール済みのProvisioning Profileの一覧を取得する

需要があるか分かりませんが, 置いておきますね.
良いやり方が他にあればご教授ください :pray:

#!/bin/bash
#
# usage: ./display_profile.sh

set -e

IFS=$'\n'
for FILE in $(find "${HOME}/Library/MobileDevice/Provisioning Profiles" -name *.mobileprovision); do
    LINE=$(( $(grep -a ">Name<" -n $FILE | awk -F':' '{print $1}') + 1 ))
    PROVISIONING_NAME=$(sed -n ${LINE}p ${FILE} | sed "s/^.*>\(.*\)<.*$/\1/")
    echo -e $(echo ${FILE} | sed "s/^.*\/\(.*\)\..*$/\1/") "\t" ${PROVISIONING_NAME}
done

出力結果は

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx     ProvisioningName1
yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy     ProvisioningName2

のようになります.

3
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4