似乎我无法在UIPrerenderedIcon
中设置Info.plist
,因为it is ignored as of iPhone OS 2.1。您无法提供String
YES
的值,不再支持此功能。
有没有其他方法可以在不必创建单独的Info.plist的情况下执行此操作(例如,使用预构建运行脚本)?
答案 0 :(得分:0)
我想出来了。您必须在“编译源代码”之前添加“运行脚本”构建阶段:
#!/ usr / bin / env sh
set -o errexit set -o nounset
/ usr / libexec / PlistBuddy -c“设置UIPrerenderedIcon $ {YOUR_CONFIG_KEY}” “$ {PROJECT_DIR} / * - Info.plist中”</ P>
答案 1 :(得分:0)
If you want to set value dynamically using command from shell script or terminal, you can do that as below:
/usr/libexec/PlistBuddy -c "Set :UIPrerenderedIcon YES" YOUR_PLIST_FILE_PATH
/usr/libexec/PlistBuddy -c "Set :CFBundleIcons:CFBundlePrimaryIcon:UIPrerenderedIcon YES" YOUR_PLIST_FILE_PATH