Last active
          January 17, 2018 12:04 
        
      - 
      
- 
        Save Pitsko/993d81ac76e8d04ca1bc to your computer and use it in GitHub Desktop. 
    ios icon overlay script
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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 "[email protected]" "[email protected]" | |
| addOverlayInfo "[email protected]" "[email protected]" | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Is this working on Xcode 9.2 with iOS 11.2 ??