Domanda

It seems I am not able to set UIPrerenderedIcon in my Info.plist, because it is ignored as of iPhone OS 2.1. You can't provide a String value of YES, this is no longer supported.

Is there any other way to do this without necessarly creating a separate Info.plist (e.g., using a pre–build run script)?

È stato utile?

Soluzione

I figured this out. You will have to add a "Run Script" build phase, before "Compile Sources":

#!/usr/bin/env sh

set -o errexit set -o nounset

/usr/libexec/PlistBuddy -c "Set UIPrerenderedIcon ${YOUR_CONFIG_KEY}" "${PROJECT_DIR}/*-Info.plist"

Altri suggerimenti

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 
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top