Skip to content

Instantly share code, notes, and snippets.

@Pitsko Pitsko/icon_overlay.sh
Last active Jan 17, 2018

Embed
What would you like to do?
ios icon overlay script
version=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${INFOPLIST_FILE}"`
build=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${INFOPLIST_FILE}"`
export PATH=$PATH:/usr/local/bin
function addOverlayInfo() {
income_icon_name=$1
outcome_icon_name=$2
echo "addOverlayInfo with income ${income_icon_name} and outcoming ${outcome_icon_name}"
income_icon_path=`find "${SRCROOT}" -name $income_icon_name`
echo "income icon path - ${income_icon_path}"
if [ ! -f ${income_icon_path} ]; then
echo "income icon is not found"
return
fi
outcome_icon_path="""${CONFIGURATION_BUILD_DIR}""/""${UNLOCALIZED_RESOURCES_FOLDER_PATH}""/${outcome_icon_name}"
echo "outcome icon path - ${outcome_icon_path}"
width=`identify -format %w "${income_icon_path}"`
echo "icon width - ${width}"
convert -background '#0008' -fill white -gravity center -size ${width}x60 -pointsize 20\
caption:"$TYPE_OF_BUILD $version($build)" "${income_icon_path}" +swap -gravity south -composite "${outcome_icon_path}"
echo "added text:$TYPE_OF_BUILD $version($build) on overlay"
}
addOverlayInfo "iPhone-60@2x.png" "AppIcon60x60@2x.png"
addOverlayInfo "iPhone-60@3x.png" "AppIcon60x60@3x.png"
@mrugeshtank

This comment has been minimized.

Copy link

commented Jan 17, 2018

Is this working on Xcode 9.2 with iOS 11.2 ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.