9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

provisioning profileからName/UUIDを抽出する

Posted at

やり方

UUIDの抽出

$ xmllint <(security cms -D -i your.mobileprovision) --xpath '/plist/dict/key[text()="UUID"]/following-sibling::string[position()=1]/text()'

Nameの抽出

$ xmllint <(security cms -D -i your.mobileprovision) --xpath '/plist/dict/key[text()="Name"]/following-sibling::string[position()=1]/text()'

解説

  • provisioning profileはそのままだと、plutilコマンドなどでparseできない。
  • securityコマンドで一度textに変換する。
  • 変換結果は Process Substitution を用いて標準出力からファイルディスクリプタとしてかませる
  • xmllintのxpathオプションで対象のKeyの名前のノードの兄弟ノードのテキストを抽出する。
9
8
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
9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?