1
0

More than 3 years have passed since last update.

[iOS13] Settings.bundleのグループ名が重複すると設定アプリの内容が正しく設定されない

Last updated at Posted at 2019-10-18

追記です この記事にあるように設定のグループ名が重複していた場合、iOS13.2では設計アプリがクラッシュします。要対応!

業務内容なのでスクショはテストアプリを作って後々更新します。

iOS13検証をする中で、アプリのSettings.bundleのRoot.plistに
「同じ名前のグループ」
があると、インストール後設定アプリに内容が正しく反映されないことがわかりました。
回避方法はグループ名をユニークにするだけですが、チェックがめんどくさいので
スクリプトを書きました。

xmllint --xpath "/plist/dict//string[text()='PSGroupSpecifier']/following-sibling::key[text()='Title']/following-sibling::string" Root.plist | sed 's/\/string>/\/string>\'$'\n/g'|uniq -c | awk '{if($1 > 1){print $0}}'

XMLLintさんで「PSGroupSpecifier」のあるアイテムの「Title」の「String」を引っ張ってきて、改行してuniqをかけます。1 以上の行があったら出力します。

   3 <string>A</string>

これでとりあえずチェックをかけて、問題なかったらOK。問題が見つかったら該当行を探して修正しましょう。

1
0
0

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
1
0