は、コマンドが.plist
ファイルを変更/一覧表示することができますPlistBuddy
が呼ばれています。
/usr/libexec/PlistBuddy
Usage: PlistBuddy [-cxh] <file.plist>
-c "<command>" execute command, otherwise run in interactive mode
-x output will be in the form of an xml plist where appropriate
-h print the complete help info, with command guide
あなたは-c "Add"
または-c "Set"
または-c "Delete"
コマンドを使用して.plist
を変更するために、カスタムのMSBuildタスクを使用することができ、さまざまなコマンドを使用してのヘルプを表示する/usr/libexec/PlistBuddy -h
を実行します。コンソールに出力し、あなたのiOSプロジェクトのルートディレクトリからのような
何かをXML形式で.plist
:
find . -name "Root.plist" | xargs -n 1 -J % /usr/libexec/PlistBuddy -x -c "Print" %
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Title</key>
<string>Debug Settings</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<string>1</string>
<key>FalseValue</key>
<string>0</string>
<key>Key</key>
<string>__monotouch_debug_enabled</string>
<key>Title</key>
<string>Enabled</string>
<key>TrueValue</key>
<string>1</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string>automatic</string>
<key>Key</key>
<string>__monodevelop_host</string>
<key>Title</key>
<string>Xamarin Studio Host</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>
<key>Title</key>
<string>AppSettings</string>
</dict>
</plist>
私はまた助けるかもしれないあなたに関連する別の質問に答え:http://stackoverflow.com/a/36795389/4984832 – SushiHangover
ヒント@SushiHangoverのおかげで。私はそれを撃つだろう。 – burnt1ce
問題ありません、それが助けてくれることを願って... ;-) – SushiHangover